This topic has 1 reply, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #70514
     maelga
    Participant

    Hi,

    I would like to:

    1. Hide the membership level in members’ profile header for only 1 of my 3 membership levels. The membership level should still be visible for members who have any of the 2 other levels.

    2. Add some text, such as “Your membership level:” and also “Upgrade to higher level”.

    How can I do this?

    Thank you

    #70539
     sharmstr
    Moderator

    Put this in your childs theme functions.php file.

    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 != '1')
        {
           echo '<a><span class="label radius pmpro_label">'.__("Upgrade to a higher level",'kleo_framework').'</span></a>';
        }
      }
    }
    

    Change the 1 to the id of the level that needs to be hidden.

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

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

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

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?