Pages not adding the template in the body class
-
Normally whenever I specify a page template using something like:
<?php /* Template Name: Test Page */ ?>
When a page is created using that template, the body has a class added with the template name. So the above would have a body class of ‘test-page’ in addition to any other assigned classes.
I’ve got a WP 4.2.2 site that will not show me the class. They all say ‘page-template-default’ regardless of what template I choose. I built the site on the Roots starter them, and have about 25 others sites built the say way. This is the first time I’ve seen this.
Anyone have an idea?
- The topic ‘Pages not adding the template in the body class’ is closed to new replies.