Skip to content

Instantly share code, notes, and snippets.

@scottnix
Created October 27, 2012 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottnix/23b0b7a3bd8ffe028e35 to your computer and use it in GitHub Desktop.
Save scottnix/23b0b7a3bd8ffe028e35 to your computer and use it in GitHub Desktop.
Add body class to Thematic Child Theme
// add a single class to the body tag
function childtheme_body_class($classes) {
$classes[] = 'added-class';
return $classes;
}
add_filter('body_class', 'childtheme_body_class');
// add multiple classes to the body tag
function childtheme_body_class($classes) {
$classes[] = 'added-class multiple-added';
return $classes;
}
add_filter('body_class', 'childtheme_body_class');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment