Last active
November 6, 2017 01:08
-
-
Save celsofabri/b1a984e3588d6458491e41af620ec4e5 to your computer and use it in GitHub Desktop.
Add Class Body Multisite / Adicionando Classe Body para Multisite
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 | |
// Apply filter | |
add_filter('body_class', 'multisite_body_classes'); | |
function multisite_body_classes($classes) { | |
$id = get_current_blog_id(); | |
$slug = strtolower(str_replace(' ', '-', trim(get_bloginfo('name')))); | |
$classes[] = sanitize_title('site-'.$slug); | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment