This topic has 2 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #167862
     larandle
    Participant

    I asked this question before but was unable to respond before it was deemed resolved. I want to display the profile type in the sidebar header.

    This was the code given to me in the last question-

    COPY CODE
    add_action( 'bp_before_member_header_meta', 'kleo_bp_profile_member_type_label' );
    function kleo_bp_profile_member_type_label() {
        $member_type = bp_get_member_type( bp_displayed_user_id() );
        if ( empty( $member_type ) ) {
            return;
        }
        $member_type_object = bp_get_member_type_object( $member_type );
        if($member_type_object){
            $member_type_label = '<p class="kleo_bp_profile_member_type_label">' . esc_html( $member_type_object->labels['singular_name'] ) . '</p>';
            echo apply_filters('kleo_bp_profile_member_type_label', $member_type_label);
        }
    }
    
    
    
     Unfortunately this code doesn't work. How do I solve this issue?
    
    Thank you
    #167880
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #167965
     Radu
    Moderator

    Hi,

    Using that code the member type it’s displayed like this :

    So the snippet works.

    What recent changes had you made recently?

    Make sure to have child theme activated, try to paste again instead the old one

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 3 posts - 1 through 3 (of 3 total)

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

Log in with your credentials

Forgot your details?