Try this
<?php $location = xprofile_get_field_data('Location', bp_get_group_member_id());
if(!empty($location)) : ?>
just pass bp_get_group_member_id() as the second parameter to xprofile_get_field_data.
@sbrajesh worked perfectly many thanks
Could I be a pain and ask you to take a look over this issue as well? If not, no worries
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/display-age-on-profile-page/
@kirkslater,
you are most welcome. Checking that thread in a minute
@kirkslater, nice idea! I hope you don’t mind me piggy backing off your post but your idea brought a related one to mind.
@sbrajesh, thanks for planting the seed. Is the following possible? Whether viewing the group or member directory, could the div for the list item; that is the row that contains the group or member, be made into a link that on hover, activates a tool tip that contains group or member profile data? And I’m not referring to hover over the existing member name link; since, in my opinion, this would require the user aim their cursor at a small defined space rather than the “acreage” a row represents.
The purpose behind the request is “context”. When looking at a list of members or groups, having the user click on the link for them to find out the details behind the member or group is wasteful and time-consuming. This is why kirkslater’s idea is so intriguing.