BuddyDev

Search

Custom user info in profile header appear twice in BuddyBoss

  • Participant
    Level: Enlightened
    Posts: 88
    Torben Heikel Vinther on #43848

    Hi

    I have followed the instructions at https://buddydev.com/showing-user-roles-buddypress-profile/ on how to sho custom user info in the profile header. It works fine except that the user info appear TWICE when I use BuddyBoss!

    How can that happen? Is it a BuddyBoss issue only?

    Here’s my code:

    
    function cci_display_user_email() {
        if ( bp_is_user() ) {
            $user_id = bp_displayed_user_id();
        }
        else {
            $user_id = bp_get_member_user_id();
        }
        $user = get_user_by( 'ID', $user_id );
        if ( $user ) {
            $user_email = $user->user_email;
        }
        echo '<br />' . $user_email . '<br />';
    }
    add_action( 'bp_before_member_header_meta', 'cci_display_user_email' ); // insert user's address in profile header
    

    Thanks

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2440
    Ravi on #43861

    Hello Torben,

    Sorry for the inconvenience. BuddyBoss does offer custom settings of info in Header as will Directory. You can check these settings under Settings > Profile > Profile Header > Elements. Please check.

    Please contact them as they can assist you better with this requirement.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved