Last active
August 29, 2015 14:26
-
-
Save cjkoepke/c6d2a421ee95450f4d3d to your computer and use it in GitHub Desktop.
Apply a single custom class to the body element using a filter.
This file contains hidden or 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 | |
//* Do NOT copy this line or above | |
add_filter( 'body_class', 'ck_custom_body_class' ); | |
function ck_custom_body_class( $classes ) { | |
$classes[] = 'custom-class'; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment