I'm trying to display a BuddyPress xprofile field on a WordPress multsite blog. I thought this might do the trick but displayed_user doesn't seem to work outside of BP? Is there an easy way to do this? I know there's an old plugin that does it in a widget but I don't really need all of that and would rather put this directly in the theme.
Here's what I've tried within the theme on the multisite blog. This works with loggedin_user->id but of course what I'm shooting for is the profile data for the blog admin. Is that possible to fetch?
<?php global $bp; $myfield = xprofile_get_field_data( 'Counties Served', $bp->displayed_user->id, $multi_format = 'comma' ); $data = xprofile_format_profile_field('checkbox', $myfield); echo $data; ?>