Skip to content

Instantly share code, notes, and snippets.

@mohsinrasool
Created October 26, 2015 16:59
Show Gist options
  • Save mohsinrasool/57803a76ed3b18b8e910 to your computer and use it in GitHub Desktop.
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
<?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