Skip to:
Content
Pages
Categories
Search
Top
Bottom

Displaying xprofile fields on freinds page


  • amtenbrink
    Participant

    @amtenbrink

    Hi,

    i’m trying to display the extra profile fields data (i created) in my profile page to my friends profiles overview.
    i already displayed it on the members page overview (with a snippet of code from the support forum).

    here are two pictures to make it more clear:

    Profile data on members page:
    https://intranet.cabeje.han-solo.net/all-members-page.jpg

    Missing Data on friends members page in my profile:
    https://intranet.cabeje.han-solo.net/my-freinds.jpg

    This is the code i used for displaying it on members page (stored in bp-custom.php):

    function my_directory() {
    if ( bp_is_active( ‘xprofile’ ) )

    if ( $membertel = xprofile_get_field_data( ‘telefon’, bp_get_member_user_id() ) ) :
    echo ‘<div class=”telefon”>’;
    echo “Telefon: ” . $membertel;
    echo ‘</div>’;
    endif;

    if ( $membermobil = xprofile_get_field_data( ‘mobil’, bp_get_member_user_id() ) ) :
    echo ‘<div class=”mobil”>’;
    echo “Mobil: ” . $membertel;
    echo ‘</div>’;
    endif;

    if ( $memberfb = xprofile_get_field_data( ‘fachbereich’, bp_get_member_user_id() ) ) :
    echo ‘<div class=”fachbereich”>’;
    echo “Fachbereich: ” . $membermobil;
    echo ‘</div>’;
    endif;

    if ( $membereinrichtung = xprofile_get_field_data( ‘einrichtung’, bp_get_member_user_id() ) ) :
    echo ‘<div class=”einrichtung”>’;
    echo “Einrichtung: ” . $membereinrichtung;
    echo ‘</div>’;
    endif;

    if ( $memberbegleitende_dienste = xprofile_get_field_data( ‘begleitende_dienste’, bp_get_member_user_id() ) ) :
    echo ‘<div class=”begleitende_dienste”>’;
    echo “Begleitende Dienste: ” . $memberbegleitende_dienste;
    echo ‘</div>’;
    endif;

    }
    add_filter ( ‘bp_directory_members_item’, ‘my_directory’ );

    Any Help would be great…
    Thanks!

Viewing 1 replies (of 1 total)

  • amtenbrink
    Participant

    @amtenbrink

    Hi,

    it would be really great if you give me a hint.

    do i have to add another filter hook? If yes, where do i have to hook?

    Thanks

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar