Generally, this is the hierarchal order in which templates will work for the custom post type.

  1. single-{post-type}-{slug}.php – (Since 4.4) First, WordPress looks for a template for the specific post. For example, if post type is product and the post slug is dmc-12, WordPress would look for single-product-dmc-12.php.

  2. single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.

  3. single.php – WordPress then falls back to single.php.

  4. singular.php – Then it falls back to singular.php.

  5. index.php – Finally, as mentioned above, WordPress ultimately falls back to index.php.

I have created this template:


But the posts pages of the theme CPT are not picking up this template? what could be the issue?

If needed I can update my question with the full CPT function.

I am using this in CPT can this be a culprit:

'capability_type'       => 'page',


1 Answer 1


You registered the post type with the name 'theme'?

Also when changing templates and anything that has any correlation to url-s always reload or load the page admin->settings->permalinks. Sometimes without this, the changes won't take effect.

  • Yes, with the name "theme"
    – WordCent
    Commented Jan 4, 2018 at 12:46
  • Hmm! The way you suggested me I did, and it worked. Looks like it was a non-issue. what causes this? Is this some cache settings? I am accepting your answer hopefully it will help someone else
    – WordCent
    Commented Jan 4, 2018 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.