What is singular.php?

It’s the nature of the WordPress template hierarchy – point being, if you don’t have a page.php, it will use singular.php, same if you don’t have single.php, it will fallback to a template lower in the hierarchy.

Ideal for themes that have the same layout for posts/pages, instead of having duplicate code in each respective template.

Leave a Comment