Last active
March 7, 2017 02:19
-
-
Save neilgee/9c744bfeb7399d101b18 to your computer and use it in GitHub Desktop.
Filter Body Class for 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
<?php | |
add_filter( 'body_class', 'extra_body_class' ); | |
// Add specific CSS class by filter | |
function extra_body_class( $classes ) { | |
if ( is_single( 'blank-title-and-content-page-template-in-genesis-theme' )) // Set conditionals - example is using a slug | |
$classes[] = 'bare-bones'; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment