Skip to content

Instantly share code, notes, and snippets.

@anestan
Created February 28, 2017 09:13
Show Gist options
  • Save anestan/5db9f4fe66b969994950c5db720af8fb to your computer and use it in GitHub Desktop.
Save anestan/5db9f4fe66b969994950c5db720af8fb to your computer and use it in GitHub Desktop.
remove class in body class wp
// 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