[Resolved] How Do I Reorder Group Tabs in BuddyPress?
-
Hi there,
Hoping somebody can help. I’m trying to change the order of the Group tabs in BuddyPress.
I have been successful reordering the Profile tabs using bp_nav. It’s the Group tabs that are eluding me.
I was able to move the Home tab in Groups with this code in functions.php:
if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) { $bp->bp_options_nav[$bp->groups->current_group->slug]['home']['position'] = '99'; }
But when I look at the array like this:`foreach ( (array)$bp->bp_options_nav[$bp->groups->current_group->slug] as $key => $value ) {
echo '<pre>';
echo '<strong>' . $key . ': </strong><br />';
print_r( $value );
echo '</pre>';
}`
I only see hooks for Home, Forum, Members, and Admin tabs. For some reason:1. I can’t seem to control anything besides the Home tab (for example when I try to change the order of Forum it doesn’t work – this code does now work)
$bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['position'] = '99';
2. I don’t see hooks for other tabs added by plugins (like Calendar, Newsletter, etc.)
I would appreciate any help! Where are these tabs hiding???
(Also happy to share the code I have to modify Profile tabs if anyone needs that.)
Looks like I am using BuddyPress version 1.6.4
Thank you in advance!
- The topic ‘[Resolved] How Do I Reorder Group Tabs in BuddyPress?’ is closed to new replies.