This topic has 7 replies, 3 voices, and was last updated 11 years by SQadmin.

  • Author
  • #6832
     gideon1210
    Participant

    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>

    #6878
     SQadmin
    Keymaster

    Hi, You can override that by adding in sweetdate-child/functions.php:

    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("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 solution
    #6880
     gideon1210
    Participant

    Hi i tried that code and it doesnt seem to work

    #6888
     SQadmin
    Keymaster

    Try 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 solution
    #6912
     gideon1210
    Participant

    The code doesnt break the page now but it still goes through to account rather than levels

    #6917
     SQadmin
    Keymaster

    I 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 solution
    #6929
     xlspecial
    Participant

    To 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

    #6984
     SQadmin
    Keymaster

    Hi, 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
Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?