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[0] != ‘subscriber’ ) :
?>
`
Correct me if I’m wrong… !?
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Excluding Roles from the member loop!’ is closed to new replies.