WordPress dynamic select with category and authors
As you may have noticed get_the_author() returns the author of the current post. You’lle need to use WP_User_Query to get the authors. E.g. $author_query = new WP_User_Query( [‘role’ => ‘Author’] ); By default the query returns an array of WP_User objects.