Body class on custom page template is name of custom template, not default
-
I read in the Page Templates section of the Codex that:
“Note: A specialized template (page-{slug}.php or page-{ID}.php) also gets the page-template-default class rather than its own body class.”However, when I checked the body class of my custom page template, it did show its own body class rather than page-template-default. That is, my page template called “page-klingon.php” shows a body class of “page-template-page-klingon page-template-page-klingon-php” (among other classes), but not page-template-default.
Site: https://angelxray.com
I am trying to understand why that would be. Any help is greatly appreciated. Thank you.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Body class on custom page template is name of custom template, not default’ is closed to new replies.