I created a custom post type ('explore') that we use in the site. The pages for this section live at http://example.com/explore/page-name
These pages work just fine, but if a user were to back out of that url and go to http://example.com/explore they are getting the generic index.php
page that is NOT what we want people to see here.
Considering this url does NOT point to any content, how can I specify which template to use? I can echo out the get_post_type()
and it shows 'explore'
as the post type, but I'm seeing that from the index.php
template.
I tried adding a page-explore.php
but that didn't work. There doesn't seem to be a index-[custom-type].php
Thanks.
/explore
is showing a post archive of that post type then can you not use the standard post archive template from the template hierarchy diagram as outlined in the official handbook docs?