Wordpress doesn't recognise my archive-test.php file

Hi,
According to this tutorial “WordPress Template Hierarchy Explained” If you create your own Custom Post Type Archive wordpress will look for this template first and render your custom template accordingly.

I can get this to work for pages by creating single-$posttype.php and then naming the new template using Template Name in the comments section within the new template file and then selecting it in the page attributes widget in the page editing screen — works fine!

But not for the Custom Post Type Archive, wordpress just calls archive.php

I’m working on my local dev server.

Any help appreciated.

Hi folks,

Can anyone tell me how to create a custom post type which applies to a post or post archive and not a page?
I don’t see how to customise a post or post archive.

I can see how it’s done for a page but not a post.

Any help appreciated.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.