• We have an extensive list of authors, editors, and subscribers. When we want to change the author on a post, though, all user roles are on the list, making it difficult to find the person we’re looking for. Is there a way to limit the list to users with certain roles (admin, editor, author, etc.) and leave out subscribers? Thank you in advance for your response.

Viewing 1 replies (of 1 total)
  • I don’t believe this plugin supports that feature. However, the code for what you’re describing is explained in the user contributed notes for the wp_dropdown_users_args filter: https://developer.www.ads-software.com/reference/hooks/wp_dropdown_users_args/

    function wpdocs_add_subscribers_to_dropdown( $query_args, $r ) {
      
        $query_args['role'] = array('contributor');
     
        // Unset the 'who' as this defaults to the 'author' role
        unset( $query_args['who'] );
     
        return $query_args;
    }
    add_filter( 'wp_dropdown_users_args', 'wpdocs_add_subscribers_to_dropdown', 10, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘Author List Showing All User Roles’ is closed to new replies.