Filter Posts by Tags in WordPress Dashboard

At the top of the WordPress All Posts page there’s a drop-down which allows you to filter posts based on a category. Currently however no such drop-down exists for tags.

Nevertheless, it’s still possible to filter posts based on tags using one of two methods:

  • Using the tags column
  • Using a tag filter URL

Using the Tag Column

To do this we first need to enable the Tags column which is not displayed by default.

  1. In the All posts click on the Screen Options tab, put a check-mark on the Tag option then Apply.
    screen options
  2. Once the column is revealed click on any tag to show only posts that have that tag.
    tags column
    To remove the filter, click on the All link just below the Posts title.

Using a Tag Filter URL

You can also filter posts based tags by loading a URL in the following format:

https://www.yourdomain.com/wp-admin/edit.php?tag=posttag
Advertisements

So for instance if you want to show only posts that contain the tag WordPress, then you would load the following URL:

https://www.yourdomain.com/wp-admin/edit.php?tag=wordpress

For a tag with containing multiple words, add hyphens to separate the words. e.g. for the tag WordPress Tutorials you would load:

https://www.yourdomain.com/wp-admin/edit.php?tag=wordpress-tutorials

To show all posts that contain two tags that are similar use:

https://www.yourdomain.com/wp-admin/edit.php?tag=tag1+tag2
Advertisements

Note that the plus here acts similar to the AND operator which means it will only show posts that contain both tags and not just one of them.

Use the same principle to filter posts with similar multiple tags:

https://www.yourdomain.com/wp-admin/edit.php?tag=tag1+tag2+tag3

To show all posts that contain either of the tags use a comma instead of the plus:

https://www.yourdomain.com/wp-admin/edit.php?tag=tag1,tag2
Advertisements

The comma here acts like the OR operator so it should load all posts that have any of the tags. WordPress will encode the comma to its Unicode equivalent (%2C) once it finishes loading.

As such, you can also use %2C instead of the comma i.e.

https://www.yourdomain.com/wp-admin/edit.php?tag=tag1%2Ctag2%2Ctag3

For both cases above don’t forget to add hyphens for tags that contain multiple words e.g.

https://www.yourdomain.com/wp-admin/edit.php?tag=wordpress+gutenberg-blocks
https://www.yourdomain.com/wp-admin/edit.php?tag=wordpress%2Cgutenberg-blocks

Now here’s a bonus trick for you: all the above also works for Categories so you don’t have to be limited to filtering posts on just one category using the dropdown.

Tags:

Leave a Reply

Feel free to share your comments or questions with me. I may not be able to respond immediately so please check later once I've approved your comment.

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