Filter Member Loop to show only members of a particular group
-
Hi. Is it possible to filter the primary member loop (eg the one that might normally be located at http://xyz.com/members) to show only members of a particular group?
Here’s what I’ve tried….
looking for documentation about this (in members-loop.php) and how to edit it… so far no luck
<?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) ) ) :the approach described here: by Perywinkle a little over two years ago.
and adding an “if statement” to <?php while ( bp_members() ) : bp_the_member(); in members-loop.php. The if statement I tried adding was
<?php while ( bp_members() ) : bp_the_member();
if( groups_is_user_member( bp_get_member_user_id() , 9) ) :So far… no luck. Have any of you managed to filter the main members loop to include only members of a particular group? If so, can you help point me in the right direction?
Thanks in advance for your help!
- The topic ‘Filter Member Loop to show only members of a particular group’ is closed to new replies.