Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 24,007
- How-to & Troubleshooting
- 129,530
- Creating & Extending
- 25,786
- Requests & Feedback
- 9,496
- Third Party Plugins
- 9,782
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,169
-
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.
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS