Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How to add a few more members-directory pages?

@henrywright

Moderator

Regarding the 4 user roles you need to filter

office, supplier, student, professional

There is a nifty little function called array_merge which you can use. You’d get your comma-sep list of users to exclude from the loop like this…

$office = get_users( 'role=Office' );
$supplier = get_users( 'role=Supplier' );
$student = get_users( 'role=Student' );
$professional = get_users( 'role=Professional' );

$users = array_merge( $office, $supplier, $student, $professional );

$exclude = implode( ',', $users );
Skip to toolbar