Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Forked from kavyagokul/remove_body_class
Created February 22, 2014 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jamiemitchell/9150572 to your computer and use it in GitHub Desktop.
Save jamiemitchell/9150572 to your computer and use it in GitHub Desktop.
function mp_remove_body_classes($classes, $class){
foreach($classes as &$str){
if(strpos($str, "YOUR_CLASS_HERE") > -1){
$str = "";
}
}
return $classes;
}
add_filter("body_class", "mp_remove_body_classes", 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment