I'm trying to add custom profile fields to the member profiles that show on the Group > Single template but
bp_member_profile_data doesn't seem to return anything.
This works fine when added to the members-loop.php:
<?php if ( bp_get_member_profile_data( 'field=Profile:' ) ) : ?> <?php echo '<BR><span class=memberslabel>Profile:</span> '; ?> <?php bp_member_profile_data( 'field=Profile:' ); ?> <?php endif; ?>
But when I add it to
groups/single/members.php it doesn't return anything.
Is there something special I need to add to make this function work in members.php?
The solution offered below works to get the profile data showing in on the group members loop, but it's showing the data of the last member for all members, I tried adding
<?php $user_ID = get_current_user_id(); ?>
and I also tried
<?php echo xprofile_get_field_data( 'Profile:', $bp->displayed_user->id ); ?>
but no change, how would I pass the relevant user ID into that function?
Also, it seems the profile fields are only showing for logged in users.