I’m trying to show profile fields with checkboxes and drop-downs in the members directory loop.
Example: Next to each member in the directory I want to show the Gender they selected
This code works for text fields:
echo xprofile_get_field_data('Full Name', bp_get_member_user_id());
BUT how do I echo profile fields for drop-downs or checkboxes (unserialized data)?
I believe xprofile_get_field_data is unserializing the data for you, but it is still in an array.
xprofile_get_field_data can return an array or a comma-separated string.
@param string $multi_format
Have a look at the new plugin “Buddypress Xprofile Custom Fields Type” http://wordpress.org/extend/plugins/buddypress-xprofile-custom-fields-type/
Got it working. Wrap the profile fields in a profile loop within the members loop and the data will output properly, just as it would inside of the profile loop.