Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to create a 'featured member' widget for a Buddypress site, and am using cimy extra fields to add the 'is featured user' checkbox. I have some extra user meta fields that were created within the buddypress profile system, like 'where are you from' which I want to show on the widget. I am able to query the members/users to get the featured user's ID, so could someone instruct on how to use bp_has_members() with a specific user ID to get basic member info like: (gravatar) (member name), from (where member is from), is our featured member this month. (profile page link)

Thanks!

share|improve this question
add comment

1 Answer

to get the buddypress profile field data use:

bp_get_profile_field_data( array( 
    'field'   => 'your-field-slug',
    'user_id' => $user_id
) );

to get the avatar look up bp_get_member_avatar(), and for the name there is bp_displayed_user_fullname() but you need to be in the bp_has_members loop for that one.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.