Skip to content

Instantly share code, notes, and snippets.

@leavlzi
Created October 21, 2017 16:00
Show Gist options
  • Save leavlzi/3e73bd3286edcdb62ccb55b34d553887 to your computer and use it in GitHub Desktop.
Save leavlzi/3e73bd3286edcdb62ccb55b34d553887 to your computer and use it in GitHub Desktop.
To remove a class of the body_class function you have to do that
add_filter( 'body_class', function( $classes ) {
foreach($classes as $key => $class) {
if( $class == "class-to-remove" ){
unset($classes[$key]);
}
}
return $classes;
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment