At the top of the All Posts page inside the WordPress dashboard, there is a drop-down which allows us to filter the posts by category. This option however useful has one glaring limitation: we can only filter posts one category at a time.
The option is therefore unhelpful in scenarios where we may want to show posts under multiple categories or posts contain two or more categories. Fortunately, we can still filter the posts using the same workaround I outlined in filtering WordPress posts by tags.
What’s more, we don’t need to install any plugin to do this but instead only need to edit and load URLs in a specific pattern. Here’s how to go about it.
Filter Posts by Multiple Categories using the URL
Login into your WordPress Dashboard and go to the All Posts page. On your address bar type the URL in the following format and press enter:
This URL will show posts that have ANY of the three categories, as the comma represents an OR operand. Edit the URL appropriately according to the number of categories you need to filter.
To show posts that have two or more categories, replace the comma with a plus:
This URL will ONLY show posts that have both categories, as the plus sign here represents an AND operand.
Filtering Categories with Multiple Words
For any category that has two or more words make sure to separate the individual words using a hyphen this way:
So for instance, if we need to show all posts that have the category Android or Windows Phone, the URL would look as follows:
On the other hand, to show posts that have both the Android and Windows Phone categories, we would load the following URL:
I hope that’s clear. If not, please refer to the video tutorial from my YouTube channel that I’ve embedded at the start of the steps. A subscribe to my channel would also be much appreciated!