Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function prefix_conditional_body_class($classes) {
- if ( get_page_template_slug(get_the_ID()) === 'mytemplate.php' ) {
- $classes[] = 'mytemplate';
- }
- return $classes;
- }
- add_filter( 'body_class', 'prefix_conditional_body_class' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement