Skip to content

Instantly share code, notes, and snippets.

@jamiejohnsonkc
Created August 13, 2018 03:49
Show Gist options
  • Save jamiejohnsonkc/9ab0976f49fbc9650c20b4d1c34a6066 to your computer and use it in GitHub Desktop.
Save jamiejohnsonkc/9ab0976f49fbc9650c20b4d1c34a6066 to your computer and use it in GitHub Desktop.
Remove body_class according to page_template #php, #wordpress
add_filter('body_class', function (array $classes) {
if (in_array('class-to-remove', $classes)) {
unset( $classes[array_search('class-to-remove', $classes)] );
}
return $classes;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment