Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


r-a-y
Keymaster

@r-a-y

You can create your own css class function to do this… similar to how WP’s Thematic, Sandbox and Hybrid themes have their own css class output function.

Here’s a few lines to get you started:

global $bp;
echo $bp->current_component; //outputs current component

echo '<br />'; // redundant line break! don't worry about this line!

echo $bp->current_action; // outputs current action

Hope that helps!

[EDIT]

For directories… you’ll have to check if the page is either BP_MEMBERS_SLUG, BP_GROUPS_SLUG, BP_BLOGS_SLUG.

eg. if ( bp_is_page( BP_MEMBERS_SLUG ) ) echo ' members';

Skip to toolbar