WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

This may be a really simple question but I've struggled to find an answer either searching here, WP forum or via Google.

I have a number of different categories and I would like to use just category.php. At the moment I have to create a thecatname-category.php page for each category but this is not very efficient as my I would have to create a new one every time a new Category was created.

So I need to find a workable solution that will display all posts from a selected Category where the category ID is passed to category.php and then display posts from that Category.

Hope that makes sense!



share|improve this question
category.php already uses the category ID; what is different in your idea? what is not working for you when you use the 'normal' category.php? – Michael Jan 28 '14 at 18:20
Thanks for your help, I found an answer here: wpbeginner.com/wp-themes/… – Kev Jan 30 '14 at 12:45

Wordpress uses the following hierarchy to determine which file should be used to display the category page:

  1. category-slug.php
  2. category-ID.php
  3. category.php
  4. archive.php
  5. index.php

Removing all of the "category-slug.php" and "category-ID.php" files whilst leaving just one file called "category.php" should do the trick.


share|improve this answer
Thanks for your help. – Kev Jan 30 '14 at 12:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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