#61406
 sharmstr
Moderator

Try this in your childs functions.php file

COPY CODE

function kleo_membership_info()
{
    global $membership_levels, $current_user;
    if (!$membership_levels) {
        return;
    }

    $levels_arr = array('2','3','4');
    if (bp_is_my_profile()) {
        if ( isset($current_user->membership_level) && in_array($current_user->membership_level->ID, $levels_arr) ) {
            echo '<a><span class="label radius pmpro_label">' . $current_user->membership_level->name . '</span></a>';
        } else {
            echo '<a><span class="label radius pmpro_label">' . __("Upgrade account", 'kleo_framework') . '</span></a>';
        }
    }
}

Change the $levels_arr to the IDs of the levels you do NOT want to show ‘upgrade’ to. Those levels will display the level name instead of Upgrade Account.

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

Log in with your credentials

Forgot your details?