![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/4e02fe98c736c0da3c439a2dd06c5452-87a1c39.jpg)
I have a multisite project. Each site is very similar design/theme wise, but with some variations (fonts, colors). Didn't seem to be best to make new child themes for each stnce the variations are aso few. Instead, I created this function:
// This function is to allow single stylesheet for multiple sites.
add_action( 'init', 'add_blogname_to_body' );
function add_blogname_to_body(){
$this_blog = get_bloginfo($show = 'name');
beans_add_attribute( "beans_body", "class", $this_blog );
}
}
The data id could be more specific than body, but you get the idea. Now I can use te single theme with small variations in a single stylesheet rather than managing multiple themes.
Any thoughts on this solution?
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/ee0464443fa9842713a735791bbea859-87a1c39.jpg)
That's the best solution!
btw, the wrapper function isn't necessarry for this case, call it directly
beans_add_attribute( "beans_body", "class", get_bloginfo( 'name' ) );
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/4e02fe98c736c0da3c439a2dd06c5452-87a1c39.jpg)
Ah yes! Very nice. I will refactor. Thanks.