Howdy!
So I’ve been doing some research on this and can’t seem to get to a sufficient or good answer - so forgive me if this has already been discussed elsewhere.
I’m using S2member w/ BuddyPress to create public facing profiles that members of the site can edit for themselves. So far so good, however when trying to display some of the custom fields I’ve set up in S2member, I am running into issues with it simply not working.
I’ve added the following code into the profile-loop.php file from the Buddypress plugin:
<?php
echo get_user_field ("occupation", $user->ID);
?>
That displays nothing.
I’ve added this as well:
<?php
foreach (get_users () as $user)
{
$user = /* Get full WP_User object instance. */ new WP_User ($user->ID);
if /* If they're at least a "Subscriber", possibly a "Member". */ ($user->has_cap ("access_s2member_level0"))
{
echo get_user_field ("bio", $user->ID);
}
}
?>
Which displays my ‘bio’ field, but it does it twice (I’m guessing because I currently only have two users). Any help would be appreciated as I’ve been trying to knock this out and feel like I just need that last bit of push in the right direction.
Thanks!