Custom Post Type Template "archive-post_type.php" isn't working
-
Hi,
recently I’ve came across a bug I guess:
I’ve made a plugin which registers a custom post type “items” and has set “has_archive” to “true”. I then wanted to make a custom archive template from within my theme and followed the instructions to copy the archive.php from the theme and rename it to archive-items.php (in my case) but for any reason WordPress resisted to load the default archive.php instead of the archive-items.php.
I was looking arround the web and googled after any similar cases but couldn’t found any. The only 2 cases which could be similar in some way, could solve their issue and only had the custom post type registered from within the theme.
Could it be that I’ve ran into a bug or is it on purpose that custom page templates won’t work if the related custom post type isn’t registered from within the theme?
Any help would be much appreciated. Thanks in advance
- The topic ‘Custom Post Type Template "archive-post_type.php" isn't working’ is closed to new replies.