Denseman on the Rattis

Formerly known as the Widmann Blog


Multiple categories in WordPress – an undocumented feature?

For a long time, I’ve been looking for a way to find postings that are filed under two or more categories in WordPress. It’s very easy to click on any of the categories in the column on the far left to find all blog postings within this category, but how do you find all blog postings about linguistics in Danish, or the blog postings I’ve written in English about Scottish politics?

I assumed there was no easy way to do it. I read the documentation I could find, I searched through lots of of WordPress plugins, but to no avail.

Today I then suddenly got the idea to see whether they had implemented it anyway, so I decided to try the different URLs that would make sense to me as a programmer.

My first instinct was to try a ‘+’ sign, and much to my surprise it actually worked!

For instance, category/fooddrink+es gives you food and drink in Spanish, linguistics+da gives you linguistics in Danish, and politics+en+scotland gives you Scottish politics in English.

You even seem to be able to get a feed, such as category/kids+linguistics/feed for the RSS feed for kids & linguistics.

The only problem seems to be that the generated heading is wrong – I’ll need to have a look at that to see whether it’s something I can fix.

Leave a Reply

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