To add an author filter on the list of articles page available in WordPress, simply add the following code to the functions.php file:
Note: I have left the comment on the conditional instruction concerning the post types, it might come in handy 😊
function restrict_manage_authors() {
/*if (isset($_GET['post_type']) && post_type_exists($_GET['post_type']) && in_array(strtolower($_GET['post_type']), array('your_custom_post_types', 'here'))) {
*/wp_dropdown_users(array(
'show_option_all' => 'Show all Authors',
'show_option_none' => false,
'name' => 'author',
'selected' => !empty($_GET['author']) ? $_GET['author'] : 0,
'include_selected' => false
));
/*}*/
}
add_action('restrict_manage_posts', 'restrict_manage_authors');