-
Author
-
March 20, 2017 at 11:55 #156076ProtonParticipant
Hi
All i want to do is for membership level to be displayed in the public buddypress profile. For example, Level:Gold, Level:Silver, Bronce etc.
Is there a function that will do this?
Thanks
March 20, 2017 at 12:03 #156077ProtonParticipantthis may help for context
Attachments:
You must be logged in to view attached files.March 21, 2017 at 15:52 #156201LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 21, 2017 at 18:44 #156233RaduModeratorHi,
See screenshot
The membership role cannot be rendered in the fields area there is no hook available.
COPY CODEfunction render_membership_level_on_profile() { if(is_user_logged_in() && function_exists('pmpro_hasMembershipLevel') && pmpro_hasMembershipLevel()) { global $current_user; $current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->ID); echo '<div class="mem-level-user-profile">Membership Level: ' . $current_user->membership_level->name .'</div>'; } } add_action('kleo_bp_after_profile_image','render_membership_level_on_profile');
The function needs to be pasted in wp-content/themes/sweetdate-child/functions.php
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 21, 2017 at 18:57 #156236ProtonParticipantHi Radu
Thanks for the reply but it doesn’t quite do what i require. What it currently does is displays the logged in users membership on every profile that the logged in user visits.
What i’d like to do is for the membership of each member, to be displayed on that members profile. For example say there are three members, Paul, Peter, John. If Paul buys Gold, it must display on Paul’s profile: Gold Membership. And if Peter buys Bronze, it must state on Peters profile: Bronze.
Can you help me with that?
Thanks!
March 21, 2017 at 19:11 #156239RaduModeratorHi,
This cannot be achieved without custom development so I cannot help you to achieve that since this is not a theme problem, you can achieve this by hiring a web developerCheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.