Custom loop for Groups Member Directories
-
Hello,
I run a site with subscriptions and I have spent a lot of time trying to create custom directories for groups that will be displaying users of specific roles but the issue is that by modifying
<?php while ( bp_group_members() ) : bp_group_the_member(); ?>
pagination shows count of all the members of the group and threre are a lot of blank pages with no members in them. So I ended using the following code before the creation of pagination.<?php $included_users = implode(',',get_users('role=subscriber&fields=ID')); ?> <?php d($included_users); ?> <?php //if ( bp_has_members( 'include=' . $included_users ) ) : ?> <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) .'&include=' .$included_users ) ) : ?> <?php //if ( bp_group_has_members( bp_ajax_querystring( 'group_members' ).'&type=alphabetical' ) ) : ?>
Now the issue is that group pages break and appears no members at all,no sidebars,nothing… Could anybody help please?? Is there sth wrong with that code?
Thank you!!
- You must be logged in to reply to this topic.