Why WordPress doesn’t detect custom post type templates?

I made a custom post type with the machine name special_media_post and wordpress was simply not seeing the single-special_media_post.php. I was at a complete lost. It kept defaulting to the index.php until I tried the following solution:

Visited the permalinks page (which will flush it) and checked again. WordPress probably just needs to be nudged to recognize your addition to the hierarchy.


Source: http://wordpress.stackexchange.com/questions/96785/custom-post-type-single-custom-php-not-working

Leave a Reply