I’ve added two custom user fields for Hometown and homestate so I can add these locations to a map. However I cannot seem to find a way to export these fields. Any ideas?
Are you trying to output your custom fields in a template somewhere?
If so, you should be able to use the BuddyPress Profile Fields API functions to output the specific data.
xprofile_get_field_data() might be the function that you are looking for. Let’s say I created a profile field called “Website” and I want to output the data for the “Website” field for the displayed user.
I could do this:
$url = xprofile_get_field_data( 'Website', bp_displayed_user_id() );
If you want to get the data for a specific user, change
bp_displayed_user_id() to the user ID in question.
Hope that helps.
You must be logged in to reply to this topic.