Reply To: [Resolved] Trying to target specific ‘group’ pages with css
however we could also just add a new class to the bp body class function!
@rodgerfuller it won’t help in the short term but I have submitted a patch to core that adds the group name to the body class output so it will have ‘group-{my-group-slug}’
Can’t see a reason why we don’t do that, so if accepted you could patch your core file in advance of the next version being released.
even if not accepted you can quite easily filter into the WP_classes function and add your own, done in functions.php should mean it runs after BP has done it’s filtering into the WP function, this is what I do in all my functions.php for additional classes required.
This will get you some way there:
$classes[] = 'group-' . groups_get_current_group()->slug;
You’ll need to filter that into the WP ‘body_class’ filter.
If you want something a little more complex then a plugin might be better, try something like: