WordPress Category Templates + Custom Taxonomies

Here’s a part of WordPress that many people overlook: Category Templates. It’s actually quite easy to set up your theme so that it adapts to the content being displayed, allowing you to set up “departments” or “sub sites” that are styled differently.

This isn’t anything new, but I recently had an interesting realization. This concept would be a lot more powerful when coupled with Custom Taxonomies, which have been a part of WordPress since version 2.8 or so.

Imagine a movie-related blog. You could have a “Departments” taxonomy set up to separate posts into reviews, production news, upcoming release announcements, box office info, etc.. You then build your theme to separate these different content types into different parts of the site, each with their own distinct “look.” (Sort of like having multiple blogs under one site, if you want to think of it that way.)

Then you can have other taxonomies setup that allow you to tag a post with actor names, movie franchises, directors, etc.. These extra taxonomies could be used to create other sorts of templates. Want to create a landing page for updates about the “Harry Potter” franchise? Create a new template with spaces that pull data from the appropriate taxonomies, and style it how you want it.

If you poke around the CNET News site, you’ll get a good idea of what I’m talking about. All of the “blogs” that are all part of the greater site have their own different stylings, and posts have metadata that allows them to be displayed in different spots. WordPress could easily be used to build something like that.