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!



  • 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, 2014 at 18:20
  • Thanks for your help, I found an answer here: wpbeginner.com/wp-themes/…
    – Kev
    Jan 30, 2014 at 12:45

1 Answer 1


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.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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