Skip to content

Listing users by group

John James Jacoby edited this page Sep 10, 2026 · 3 revisions

Listing Users by Group

Use wp_get_users_of_group() to retrieve users assigned to a term:

$users = wp_get_users_of_group(
    array(
        'taxonomy' => 'user-group',
        'term'     => 'editorial',
        'term_by'  => 'slug',
    )
);

See the Developer API for arguments, return values, membership helpers, and complete examples.

Clone this wiki locally