Reply To: specific profile fields in the loop, if empty show content previous member
I’m having the same problem!
I have just one field I want to show in the Members Directory (members-loop.php), Current Location, and I’ve tried a few different code variations I found here in the forums with no luck.
I thought this one would do the trick, but no dice. With this code, if a member hasn’t filled out the Current Location field, it still shows the value of the last person in the list who did have it filled in.
<?php if ( $data = bp_member_profile_data( 'field=Current Location' ) ) : ?>
<?php echo $data ?>
<?php endif ?>
Anyone have any suggestions for me and @ariane1001?