Skip to:
Content
Pages
Categories
Search
Top
Bottom

Action to Display Profile Information in Group Member Directory?


  • ericreynolds007
    Participant

    @ericreynolds007

    I added the following code to my theme functions.php to successfully display member profile data in my member directory and friends member list. I also would like to display the same profile info in the group member directory but I don’t know what function to call for (displayed as ????????????? below). Can anyone help?

    function add_member_custom_extended_profile() {
    $data_name = bp_get_member_profile_data( 'field=Affiliation' );
    $data_art_school = bp_get_member_profile_data( 'field=Art School' );
    $data_grade_level = bp_get_member_profile_data( 'field=Grade Level' );
    echo 'Affiliation' . ' - ' . $data_name . '';
    echo 'Art School' . ' - ' . $data_art_school . '';
    echo 'Grade Level' . ' - ' . $data_grade_level . '';
    }
    add_action('bp_directory_members_item',  'add_member_custom_extended_profile');
    add_action('?????????????',  'add_member_custom_extended_profile');
Viewing 3 replies - 1 through 3 (of 3 total)

  • 4ella
    Participant

    @4ella

    Nice snippet @ericreynolds007 , it works very well ! Did you managed to get to find a code for Group members directory ? Would be nice to show fields IF are present , otherwise hide


    Quint
    Participant

    @qrahaman

    I don’t understand. You want to add the Admin/Mod profile data to the group in the group directory? Which Admin, which Mod? Or a different member’s profile data to the group. Then which one?


    4ella
    Participant

    @4ella

    I understand , he wants to add this data also below every member in every group’s directory , it means if Group A has 20 members he wants to show their profile fields in that Group A member’s directory, at this moment code shows members profile fields data only in members directory (general)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Action to Display Profile Information in Group Member Directory?’ is closed to new replies.
Skip to toolbar