Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
WP User Query && multiple roles
* Gell all users that have role1 and users that have role2 and role n...
* @link
* @link
* @param $args
* @since 4.4
$users = get_users( [ 'role__in' => [ 'administrator', 'subscriber', 'author' ] ]);
var_dump( $users );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment