-
Author
-
November 17, 2013 at 13:33 #6832gideon1210Participant
How do you redirect the tab on the profile which states what membership level they are to the membership level page instead of the account i believe in the member header its this code but i dont no what bit to change
<?php
/**
* kleo_bp_after_profile_username
*
* @hooked kleo_membership_info – 10
*/
do_action(‘kleo_bp_after_profile_name’);
?>
<p> </p></div>
November 19, 2013 at 02:03 #6878SQadminKeymasterHi, You can override that by adding in sweetdate-child/functions.php:
COPY CODEfunction kleo_membership_info() { global $membership_levels,$current_user; if (! $membership_levels) { return; } if (bp_is_my_profile()) { if (isset($current_user->membership_level) && $current_user->membership_level->ID) { echo '<a href="'.pmpro_url("levels").'"><span class="label radius pmpro_label">'.$current_user->membership_level->name.'</span></a>'; } else { echo '<a href="'.pmpro_url("levels").'"><span class="label radius pmpro_label">'.__("Upgrade account",'kleo_framework').'</span></a>'; } } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 19, 2013 at 02:51 #6880gideon1210ParticipantHi i tried that code and it doesnt seem to work
November 19, 2013 at 11:32 #6888SQadminKeymasterTry the code again, I re-pasted it
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 19, 2013 at 13:48 #6912gideon1210ParticipantThe code doesnt break the page now but it still goes through to account rather than levels
November 19, 2013 at 14:36 #6917SQadminKeymasterI don’t know how you added it or what you did but the code works. I re-tested it…
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 19, 2013 at 16:10 #6929xlspecialParticipantTo go along with this, how would I be able to display the membership level on all profiles, not just the users?
Meaning, if I visit someones profile it will show if they are a gold level member like it does when I visit my own profile. It doesn’t need to link to anything. Just show the level.
If it could also be displayed on the search results that would be fantastic.
Thanks
November 21, 2013 at 01:18 #6984SQadminKeymasterHi, See this topic to show for all users profile: https://archived.seventhqueen.com/forums/topic/member-level-displayed-on-profile
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.