I created a specific template for one page only = I don't want it to be listed in the admin section. So I removed the "Template name" from the comment and let WP figure it out by the slug of the post. That works. Now I would like to assign a custom body class for this template only (as I do with every page) in my functions file:
function cc_set_body_classes($classes) {
switch(true) {
case is_page_template("page-about-us.php"):
$classes[] = "about-us";
break;
}
return $classes;
}
add_filter("body_class", "cc_set_body_classes");
Now this would obviously work just fine if it wasn't a specific template without the Template name. Is it possible to figure out the template name if no Template name is specified in the comments? How should I do it? Thanks a lot!