Skip to:

Random Members in Header

  • Nick Watson


    I’ve recently upgraded to the buddypress 1.2 RC3 and I’m having some troubles.

    So on my old site, in the header file I had a code that generated random members and placed their avatars in a bar at the top of every page.

    But now in 1.2 functions have changed and I need to get a new code for it.

    The problem I’m having is for some reason on the member pages instead of grabbing 10 random members from the site and displaying them at the top, it’s displaying 10 random FRIENDS of the member you’re currently on the page of.

    This is a huge problem because if a member doesn’t have 10 friends it doesn’t fill the spot.

    How can I set it up so that on every page it displays 10 random members on the site, not friends?

    this is the code I’m using currently

    <?php if ( bp_has_members('type=random&per_page=10') ) : ?>

    <div id="membar-list">
    <?php while ( bp_members() ) : bp_the_member(); ?>

    <a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar() ?></a>

    <?php endwhile; ?>

    <?php do_action( 'bp_after_directory_members_list' ) ?>

    <?php bp_member_hidden_fields() ?>

    <?php endif; ?>

    I did try using

    'type=random&per_page=10&user_id= USER NUMBER

    And that allows me to display all the friends of w/e user ID I put in there.

    Anything to help would be great!


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

  • Nick Watson


    Any help is greatly appreciated :D

    Nick Watson


    I am using buddypress 1.2 now, but I still can’t seem to find away to fix this.

    I just want it to display ALL the users on the site, instead it keeps only displaying the friends of the user you are currently viewing.

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