I know I can use the Template Hierarchy to set up custom theme pages for terms inside a category, like these:

mysite.com/category/tech/              // category-tech.php
mysite.com/category/blog/              // category-blog.php
mysite.com/category/featured/          // category-featured.php

category.php does not seem to work for the overview page, but it would work for a page like mysite.com/category/tech/ if a more specific template file (category-tech.php) was not available. I want to create a "category overview" page (mysite.com/category/) which would show all the terms of the category taxonomy.

Similarly, I would also like to be able to do this with a custom taxonomy, such as mysite.com/books/ in this case:


I do want this done dynamically, i.e. I don't want to create a page called 'category' with a permalink category and then add the items to that page. I think it would work but that seems like a hack.

  • do you want category overview page to just list all the categories or something else? – helgatheviking Feb 26 '12 at 19:31
  • You mentioned category.php not working - For what I'm hearing you describe, that should work well. Custom taxonomies, of course, would need to be handled with their own template. Can you describe what's not working about category.php? Let's get that one figured out first. – Jonathan Wold Feb 27 '12 at 2:39
  • @JonathanWold basically if you visit http://yoursite.com/category/, and replace yoursite.com with a wordpress site, but don't replace /category/ with anything else, you will get a 404 page. This is the url I would like to be able to hook into and do something such a list all of the categories. – cwd Feb 27 '12 at 5:12

There is no default rewrite to a template for a category or taxonomy landing page. You are correct, that this can be done by creating a custom template and applying it to a page.

| improve this answer | |
  • What happens when you visit your wordpress site /category/ ? I'm assuming you will get a not found page. – cwd Feb 27 '12 at 1:39
  • You can create a new page and assign a template to it, you are correct that by default there is no rewrite to category.php. – Rachel Baker Feb 27 '12 at 1:43
  • see question I do want this done dynamically, i.e. I don't want to create a page called 'category' – cwd Feb 27 '12 at 1:47
  • by default there is no rewrite – Rachel Baker Feb 27 '12 at 1:51
  • looks like anything else is too complicated so even though I mentioned I did not want to create a page called "category" this is probably the best way – cwd Feb 27 '12 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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