Search code examples
wordpresstemplatescustom-post-type

Custom template for custom post type not recognized by Wordpress


I have a custom post type named machines for which I have created a custom template called single-machines.php.

I triple checked the name to make sure it's not a typo.

If I manually set the template to be used it works fine, but Wordpress doesn't recognize it automatically.

How can I make Worpdress recognize it as the template to be used for that post type?

Since I don't know what other factors can play a part in this I would like to add:

  • I am working on a child theme.
  • I am using the OceanWP theme.
  • I have created the post type with PODs.

Solution

  • I use this plugin to show me which template WordPress is currently using, helps when dealing with template hierarchy