custom post types – How to specify a template for a path like


I created a custom post type (‘explore’) that we use in the site. The pages for this section live at

These pages work just fine, but if a user were to back out of that url and go to 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


Scott 2 years 2022-01-28T11:55:12-05:00 0 Answers 0 views 0

Leave an answer