0

This is more of a clarification question, but if I don't have a single-CPT.php script in my child theme, then will all my CPTs default onto single.php? I am just wanting to clarify more than anything. It appears that way on my local dev, but I thought this wasn't the case?

1 Answer 1

1

Yes, they will.

You will find the WordPress template heirachy useful, particularly this graphic:

enter image description here

This shows how the templating system works - in particular, how WordPress will select the most specific template it can find, with fallbacks to the least specific (eventually, to index.php).

In your case, you'll see in there that single-$posttype.php falls back to single.php, then singular.php, then finally index.php (direct link to single post section of docs).

0

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.