Last active
December 5, 2018 07:09
-
-
Save oliwa/a90995e13a1b2f633de9 to your computer and use it in GitHub Desktop.
add blog ID to body class
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 blog_ID class to the body tag, see http://zurb.com/forrst/posts/Wordpress_multisite_blog_class-dAb | |
| add_action( 'body_class', 'wpmu_body_class' ); | |
| function wpmu_body_class( $class ) { | |
| global $current_blog; | |
| $class[] = 'site-lang-' . $current_blog-> blog_id; | |
| return $class; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment