Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP Members Loop in a Widget

  • Hi folks,

    I’m working on the BP Random Member Widget to build a ‘Member Spotlight’ widget that will display a random member but will include information from their extended profile. The code I’ve got works perfectly on the user’s profile page but the extended profile fields vanish on the main site…very confusing as the avatar and user name stay put.

    What am I missing?

    `//Currently just the first user, I’ll set this up later
    if ( bp_has_members( ‘user_id=1&max=1&populate_extras=0’ ) ) : ?>


    <a href="”>


    <a href="” title=””>

    `

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    Try this:

    `

    <?php
    $this_id = bp_get_member_user_id();
    $this_profile_field = xprofile_get_field_data(‘About%20My%20Research’, $this_id);
    echo $this_profile_field;
    ?>
    `


    evolver
    Participant

    @1missrodnee

    I would love to do this! Did the code work? Where do I place it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BP Members Loop in a Widget’ is closed to new replies.
Skip to toolbar