Page template body class not working after updates
-
Hi there,
I’m hoping someone else has seen this issue before. I built a theme for a client about 6 months ago. Virtually every page on the 20+ page site has a custom layout and uses the template body class format “page-template-{directory}{filename}-php” for styling.Recently, they’ve been making updates to plugins and a couple of pages now have broken styles. I looked into this and found that the body class used for styling is no longer being generated. Other classes are still present generated, so generic site styles are working fine, but that specific class is missing (again, only from 2 out of 20+ pages).
I updated plugins on my local environment and expectedly, I start getting the same problem on my environment. So, the next step, in my mind is to deactivate everything and start re-activating one at a time to find the issue. However, when I deactivate everything, the issue is still there. So, I remove the plugins folder from the project altogether. No change.
Seemingly, something has happened to the WordPress installation from a plugin update that has caused the body_class() function to malfunction. But, I have no idea how to troubleshoot this, if the problem stays after removing ALL plugins. Any ideas? Is this something that could be from a recent WP update?
Any help would be much appreciated! Thanks.
- The topic ‘Page template body class not working after updates’ is closed to new replies.