This topic has 1 reply, 2 voices, and was last updated 6 years by Abe.

  • Author
  • #168835
     ladlift
    Participant

    How do I make it so each user can see the membership level label of another users?

    #168885
     Abe
    Keymaster

    Hi there, we are using a function that shows it only to you for your profile, to show the membership to everyone you can just redefine the function in sweetdate-child/functions.php. The modified function to add is this:

    COPY CODE
    
    function 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( "account" ) . '"><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>';
    			}
    		//}
    	}
    

    Careful when adding custom codes, do it from FTP so you can always remove the code if it gives you errors.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?