WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up my blog so that the following URL pattern:


Will use the template file category.php

I have created the template, however, when I access the URL, I just get the template front-page.php (I'm not being redirected - the URL in the address bar is still http://myblog.com/category/somecategory/)

The links to the category pages are being auto-generated by the Categories widget and each category has at least one post in it.

Can anyone help?


share|improve this question

closed as too localized by toscho Jul 18 '12 at 21:38

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I'm not exactly sure what you're trying to accomplish. Could you try to clarify? – Jeremy Jared Oct 14 '11 at 12:45

Do you have:

  1. A category somecategory defined?
  2. Posts categorized with somecategory?
  3. Some default else: content in the Loop in category.php?

I suspect the URL is returning a 404, and WordPress is simply serving up the root URL, because it has no content to serve up from category.php.


You don't need to do anything special to get WordPress to use the category.php template. It is a built-in part of the Template Hierarchy. You simply need to have a category created, and have Posts in that category.


Can you try resetting your permalinks?

Do you have a live site link, so we can see the problem in action?

What is the markup of your category.php template file? Can you post it?

share|improve this answer
I've updated the question based on your response. – Dan Oct 14 '11 at 13:07
See updated answer; have a few more questions for you. – Chip Bennett Oct 14 '11 at 13:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.