I’ve created a custom template, template-basic.blade.php, for pages, posts and my post type, essays.
{{--
Template Name: Basic Template
Template Post Type: post, page, essay
--}}
While the classes output on the <body>
correctly for pages, they do not for my CPT, essays.
Here are the <body>
classes for the Advertising Info page:
<body class="page-template page-template-template-basic template-basic …">
The page includes a template-basic
class, but this class name not exist for the CPT post as shown below. Should there be a space between essay-template-views and template-basic?
<body class="essay-template essay-template-views essay-template-template-basic essay-template-viewstemplate-basic single single-essay …">
The whole point of using the same template is to have one unique class name shared between them regardless of post type.
Is there a way of fixing this?