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

I've registered custom post type "deals" and its taxonomy "deals-category"
the page site/deals/ runs the archive-deals.php fine
but in page site/deals-category/travel/ runs the archive.php file!
How can i make site/deals-category/travel/ runs the archive-deals.php or other file ?

share|improve this question
up vote 0 down vote accepted

Refer to the Template Hierarchy to see why this doesn't work. archive-{$post_type}.php is only for custom post type archive display, the format for custom taxonomies is taxonomy-{$taxonomy}.php.

share|improve this answer
Thanks a alot, Milo – Moktar Jul 16 '13 at 19:32
Thanks a lot, it is working now but not the pagination, I'm using wp-pageNavi, the pagination is displayed well, but the title is "page not found" ! – Moktar Jul 30 '13 at 6:00
are you modifying the query in the template? – Milo Jul 30 '13 at 6:03
yes, just post_type, posts_per_page, paged – Moktar Jul 30 '13 at 6:06
use the pre_get_posts action to modify queries before they are run, don't do it in the template. – Milo Jul 30 '13 at 6:15

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.