Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Problems with $bp->current_component – Am I doing something wrong?


Burt Adsit
Participant

@burtadsit

if ($bp->current_component == $bp->groups->slug && $bp->is_single_item){}

Is how I detect if the user is in a group page in the member theme. Such as: /groups/cats

if ( $bp->current_component == $bp->groups->slug && empty( $bp->current_action ) ) {}

Is how I detect is the user is in a group directory. The group directory doesn’t have anything after /groups. There’s no ‘action’ to detect.

If you take a look at bp-groups.php groups_setup_nav() you’ll see all the stuff bp sets when a user vists one of their groups.

Skip to toolbar