Reply To: Excluding Roles from the Member's Directory.
@somethingelse great to see you got it working for you.
our membership changes regularly… i don’t want to have to re-code my members-loop every time a member leaves or joins
Why must the exclude ID list be fixed?
I wouldn’t suggest doing something like $excluded_users = '1,2,3';
Rather, your list of IDs to exclude should be dynamic e.g.
$excluded_users = $ids;
where $ids is a list of your users with role s2member_level3 – which is continually updated. To get $ids you’d just need to query for the s2member_level3 role.