If you’ve got a massive site like Bloginity, that features over 37 categories in total then you know you want to seperate these categories and make sure they are all laid out in a good way.
That’s why I created completely different archive pages for:
- Author templates
- Category templates
- Tag templates
LIVE EXAMPLE OF CATEGORY/TAG TEMPLATES
- New York Fashion Week (TAG)
- Paris Fashion Week (TAG)
- Milan Fashion Week (TAG)
- London Fashion Week (TAG)
- Fashion Week (TAG)
- Fashion (CATEGORY)
- Arts (CATEGORY)
It’s so easy to achieve, head over to WordPress Codex and read up on the category/tag template and if you’re running into trouble then you’re obviously not doing it right. But if you are, and you were able to create a template for a tag, category then here’s the code on how to exclude certain categories and or tags from that category itself.
How to exclude a category from an archive template
Example: You have a category that’s name is “Food” and it’s ID is 3298 (use “Reveal IDs” plugin for WordPress to find the category ID).
Simply minus it, from where the cat= begins.
Throw this code in the template code and it should do the job just right.
query_posts($query_string . '&cat=-3298');
NOTE: You have to wrap it in a proper ?php open/close.