Skip to:
Content
Pages
Categories
Search
Top
Bottom

Insert Code Next to BP Profile Avatar


  • buddhatunes
    Participant

    @buddhatunes

    Any suggestions on how to show data to right of member avatar in #buddypress div#item-header div#item-header-content?

    I have custom user fields that I want to replace the user area with custom div that will have data-show=”” and data-server=”” tags info from user

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

  • ricardo_s
    Participant

    @ricardo_s

    Anyone who knows how to do this?

    It woud be nice to be able to display profile data on the right side of the avatar when viewing the profile page..


    danbp
    Participant

    @danbp

    hi @ricardo_s

    file reference is bp-templates/bp-legacy/buddypress/members/single/members-header.php
    Codex infos about loops

    Put the function in your-theme/functions.php or in bp-custom.php.

    Example

    function my_function_name () {	
    // your stuff here
    if ( $data = bp_get_profile_field_data( 'field=your_field_name ' ) ) : 
    ?>
    <div class="what_you_want">
    <?php
    echo xprofile_get_field_data( 'your_field_name', bp_displayed_user_id() );
    ?>
    </div>
    <?php
    endif;
    
    }
    add_filter( 'bp_before_member_header_meta', 'my_function_name' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Insert Code Next to BP Profile Avatar’ is closed to new replies.
Skip to toolbar