I am using archive-{post_type}.php for queries of a custom post type. I want the system to use archive.php for category searches but it is defaulting to category.php which I am using for category searches (different categories) for regular posts. Does anyone have an idea of what could be going wrong?

1 Answer 1


I am not sure what you mean by category searches?

In is_category() branch of template hierarchy category.php precedes archive.php, it is intended and wanted behavior. If you want to change template behavior for specific category you will need to override that logic, likely in template_redirect hook or around that.

  • That is what I thought, too, until I found this in the Codex (this was wishful thinking on my part): http://codex.wordpress.org/Template_Hierarchy. You have to scroll down a bit to see the chart. I will research it and try your suggestion on the template_redirect. Thank you!
    – mktggirl
    Commented Jun 7, 2011 at 21:06

Your Answer

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

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