Custom Post Type Archive.php

I have a custom post type called ‘camps’, and in there I have different categories ie derbyshire, staffordshire etc.

I have created a template archive-camps.php for this.

Read More

archive-camps.php works fine when we go to www.domain.com/camps but if we go to www.domain.com/camps/derbyshire it uses the default archive.php

Why does it do this?

Related posts

Leave a Reply

1 comment

  1. From Codex:

    1. taxonomy-{taxonomy}-{term}.php – If the taxonomy were sometax, and taxonomy’s slug were someterm WordPress would look for taxonomy-sometax-someterm.php. In the case of Post Formats, the taxonomy is ‘post_format’ and the terms are ‘post-format-{format}. i.e. taxonomy-post_format-post-format-link.php

    2. taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php

    There is no custom post type custom taxonomy archive page. Custom taxonomy can exist without custom post type. So what you need is a taxonomy template.