Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I display member profile fields under profile for a friend request?

  • Avatar of ericreynolds007
    ericreynolds007
    Participant

    @ericreynolds007

    I was successful in displaying member profile fields for each profile displayed in my member directory, using the following code and action. Now, i need to display the same profile fields when a member views a friend request notification. Currently, only the profile name of the requesting member and “Accept” and “Request” display. Is it as easy as adding an additional ‘add_action’ function calling the friend requesting member? If so, does anyone know the slug? Thanks.

    ‘function add_member_custom_extended_profile() {
    $data_name = bp_get_member_profile_data( ‘field=Affiliation’ );
    $data_jobs = bp_get_member_profile_data( ‘field=Member Since’ );
    echo ‘ Affiliation’ . ‘ – ‘ . $data_name . ‘
    ‘;
    echo ‘Member Since’ . ‘ – ‘ . $data_jobs . ‘
    ‘;
    }
    add_action(‘bp_directory_members_item’, ‘add_member_custom_extended_profile’);’

You must be logged in to reply to this topic.