Created
February 28, 2017 09:13
-
-
Save anestan/5db9f4fe66b969994950c5db720af8fb to your computer and use it in GitHub Desktop.
remove class in body class wp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Removes no-sidebar class from the body_class array on Panel Pages. | |
add_filter('body_class', function (array $classes) { | |
if ( is_page_template('panel-page.php') ) { | |
unset( $classes[array_search('no-sidebar', $classes)] ); | |
} | |
return $classes; | |
}, 12 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment