Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.