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

  • Author
  • #169702
     psmorrow
    Participant

    Hi, I would like to add a few xprofile fields to the results of a member search.   I done this for the members list , and hope to do the same when member search results are displayed.  Here is a snippet from my bp-custom:

    // add xprofile fields to member list

    function my_directory() {

    if ( $interests = xprofile_get_field_data( ‘Interests’, bp_get_member_user_id() ) ) :

    echo ‘<br/><div class=”type”>’;

    echo “Interests: “;

    echo $interests;

    endif;

    }

    add_action( ‘bp_group_members_list_item’, ‘my_directory’ );

    I prefer to add this to bp-custom, but open to other suggestions.

    Thanks!

    #169767
     psmorrow
    Participant

    Please also note that I’m searching members using the visual composer search form.
    Thanks!

    #169771
     psmorrow
    Participant

    Marking as resolved:

    COPY CODE
    
    add_action( 'bp_directory_members_item', 'my_directory' );
    
    #169970
     Radu
    Moderator

    Hi,

    Ok then

    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 4 posts - 1 through 4 (of 4 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?