How to Filter Blog Posts by Author in WordPress Admin panel

In this post I will share step by step instruction on how you can easily filter blog posts by authors in WordPress Post Panel.

The default list panel lets you filter posts by

  • Month
  • Category
  • Post Status

The Author filter is not included by default.

So to add the author filter, we will make use of a plugin Author Filters.

As the name suggests, this plugin lets you filter the blog posts by author.

Lets see how it works.


Install and activate the plugin

Install and activate the Author Filters Plugin and go to All Posts in your WordPress Panel.

A new Filter will appear which will let you filter posts by authors.

Refer to the screenshot

Now you can simply filter the posts by author.


Using a Code Snippet

You can achieve the same result with a code snippet also.

Simply utilize the below snippet and add to your website using a code snippet plugin.

If you dont know how to add code snippet, checkout our Beginners Guide to Adding Code Snippets in WordPress.

 /**
* This section makes posts in the admin filterable by the author.
*/
add_action('restrict_manage_posts', 'ditt_filter_by_author');
function ditt_filter_by_author() {
        $params = array(
            'name' => 'author',
            'role__in' => array('author','editor','administrator')
        );
        if ( isset($_GET['user']) ) {
            $params['selected'] = $_GET['user'];
    }
    wp_dropdown_users( $params );
}

The above snippet will add a dropdown of all the users in the post list screen.


Conclusion

Adding an Author filter in wordpress is quite easy.

If you have any questions then feel free to ask in comments.

Leave a Comment

Your email address will not be published. Required fields are marked *