Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to get a section identifier in the body tag?


peterverkooijen
Participant

@peterverkooijen

I think I finally got what I wanted using all these combined:

$c[] = $bp->current_component; //outputs current component
$c[] = $bp->current_action; // outputs current action

if ( $bp->current_component == 'activity' || $bp->current_component == 'profile' || $bp->current_component == 'wire' || $bp->current_component == 'messages' || $bp->current_component == 'friends')
$c[] = 'members';

if ( bp_is_page( BP_MEMBERS_SLUG ) )
$c[] = 'members';

The shorter version from two posts ago apparently does not work.

If I leave anything out, something breaks; I get a ‘members’ tag on ‘groups’ and ‘blogs’ or no tags or whatever. Why, I have no clue…

Is there a way to exclude or remove a tag? I don’t want two buttons on the navigation highlighted on the groups members section, for example.

Skip to toolbar