Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Replacing Activity Status with xProfiles field data

@dcavins

Keymaster

To display extended profile fields in the members directory, it’s easiest to add a function to your theme’s functions.php file. My theme is based on the bp-default theme, so in my file /wp-content/themes/theme-name/members/members-loop.php, there’s this action at the end of each member’s entry that we can hook into:

Open up your functions.php file and add something like this:

function add_member_custom_extended_profile() {
if ( $xprofile_tele = bp_get_member_profile_data( 'field=Telephone' ) ) {
echo 'Telephone:' . $xprofile_tele . '
';
}
}
add_action('bp_directory_members_item', 'add_member_custom_extended_profile'); 

You can get the exact field name to use by looking at a member’s profile page and copying the text in the left-most column.

I originally got this idea from here: http://premium.wpmudev.org/forums/topic/bp-add-profile-field-data-to-members-directory-with-links

Skip to toolbar