Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 24,019
- How-to & Troubleshooting
- 129,642
- Creating & Extending
- 25,793
- Requests & Feedback
- 9,497
- Third Party Plugins
- 9,793
- Showcase
- 3,316
- Ideas
- 1,382
- Miscellaneous
- 9,180
-
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.