Displaying XProfile Fields in Blog Directory
-
Hello
I have a Multisite installation with BuddyPress. I’d like to display user’s extended profile fields in the site directory (blog loop)Based on the documentation, I’ve tried this:
<?php add_action( 'bp_directory_blogs_item', 'display_user_xprofile' ); function display_user_xprofile() { $args = array( 'field' => 'Phone', // Field name or ID. // 'field' => 'Car', // Field name or ID. // 'field' => 'Languages', // Field name or ID. ); $phone_number = bp_get_profile_field_data( $args ); if ($phone_number) { echo 'Phone Number: ' . $phone_number; // echo 'Car?: ' . $phone_number; // echo 'Languages: ' . $phone_number; } }
Without success. Please advise how to display this info.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.