Created
August 13, 2018 03:49
-
-
Save jamiejohnsonkc/9ab0976f49fbc9650c20b4d1c34a6066 to your computer and use it in GitHub Desktop.
Remove body_class according to page_template #php, #wordpress
This file contains 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
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