Every so often, I get a support question that goes something like this:
I want a special page on my site that lists posts from only one category. I know I need to create a custom page template for this, but how do I make it load just the posts from my category?
I don’t get asked this too often, but when it does come around, it usually gets asked multiple times in the same week for some reason. The problem is that you don’t have to write any kind of code or create a custom page template. WordPress has already created the page for you. This is called a “category archive.”
WordPress actually creates all kinds of archives. You have taxonomy term archives, author archives, time-/date-based archives, and the potential for many more. So, sometimes these pages already exist and you’re just not aware of them.
How to show the category archive in a menu
Most folks are concerned with adding the category archive to their menu so their visitors can easily find the page. We’re so used to thinking of pages being in the menu that we don’t think of adding other items. In the past, this was pretty much the only choice available without writing some code. However, WordPress’ nav menus system takes care of that.
To add a category archive to one of your menus, go to “Appearance > Menus” in the WordPress admin. Look for the section labeled “Categories.” Then, select the categories you want and add them to your menu.
The following screenshot illustrates what this looks like.

Nav menu with category
Altering the output of the category archive
Some users still want this page to display different data than the other archive-type pages for their special category. That’s easily doable.
To do this, you can create a category-$slug.php template where $slug is your category slug. Within that file, you can create anything you want. It’ll overwrite the template your theme normally uses to display category archives.
Keep in mind that many themes do things differently when it comes to templates, so get in touch with your theme author if you need help with this.
If you’re using any of my themes or themes built off Hybrid Core, the template name should be taxonomy-category-$slug.php.
There are also some hooks available for adding fields to the category archives. Very handy for using more static content on category archives.
I think it requires these hooks:
edit_category_form_fields,category_add_form_fields,edited_category,created_categoryThanks for sharing this Krogsgard. This is really something new to me
this is actually a very handy feature for those who are willing to build a small website using Wordpress.
I am new to wordpress, though I was not aware of it before, thanks for sharing it
The template hierarchy demonstrates this nicely -
http://codex.wordpress.org/images/1/18/Template_Hierarchy.png
Thank you so much for writing this. I had a feeling it would be really simple but I have been trying to work out how to do this for weeks!
You are officially my saviour!