Excluding Roles from the member loop!
Been wanting to exclude users with the role ‘subscriber’ from the member directory.
I’ve been looking around for this for a while. I think I may have found it!
Editing the members-loop.php like so:
<?php while ( bp_members() ) : bp_the_member();
$user = new WP_User( bp_get_member_user_id() );
if ( $user->roles != ‘subscriber’ ) :
Correct me if I’m wrong… !?
- The topic ‘Excluding Roles from the member loop!’ is closed to new replies.