Created
June 17, 2016 15:52
-
-
Save oliwa/b27956d8662129a2594ed286e7169dfb to your computer and use it in GitHub Desktop.
Output blog ID in body tag
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 site-id class to body functions.php | |
add_filter('body_class', 'multisite_body_classes'); | |
function multisite_body_classes($classes) { | |
$id = get_current_blog_id(); | |
$classes[] = 'site-id-'.$id; | |
return $classes; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment