Created
October 26, 2015 16:59
-
-
Save mohsinrasool/57803a76ed3b18b8e910 to your computer and use it in GitHub Desktop.
add a class to the body tag identifying the blog on a wordpress multi site install
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 | |
add_action( 'body_class', 'my_body_class' ); | |
function my_body_class( $class ) { | |
global $current_blog; | |
$class[] = 'site-' . $current_blog-> blog_id; | |
return $class; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment