Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 24,006
- How-to & Troubleshooting
- 129,530
- Creating & Extending
- 25,790
- Requests & Feedback
- 9,496
- Third Party Plugins
- 9,784
- Showcase
- 3,316
- Ideas
- 1,398
- Miscellaneous
- 9,170
-
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