At the top of the All Posts page inside the WordPress dashboard there is a drop-down which allows us to filter the posts shown based on the category they’re in. This option however useful has one glaring limitation: we can only filter 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.
Edit URL to Filter Posts under Multiple Categories
- 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 commas represent 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 the 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 i.e.
So for instance if we need to show all posts that are in the category Android and Windows Mobile, 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 or like would also be much appreciated!