Random Members in Header
-
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; ?>
</div>
<?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!
Thanks
- The topic ‘Random Members in Header’ is closed to new replies.