The BuddyPress Groups API makes it very easy to add functionality to groups. Sometimes, though, you need to do something where the API won’t help you, like reordering the position of tabs and setting a new default tab.
Have a look at the following function:
function shabushabu_change_group_tag_position()
{
global $bp;
if ( $bp->current_component == $bp->groups->slug )
{
$bp->bp_options_nav['groups']['home']['position'] = 20;
$bp->bp_options_nav['groups']['home']['name'] = __( 'Activity', 'buddypress' );
if ( $bp->current_action == 'home' )
$bp->current_action = 'group-information';
}
}
add_action( 'bp_init', 'shabushabu_change_group_tag_position' );
The first thing we need to do is declare the $bp global
global $bp;
To change the position of a tab we need to modify the bp_options_nav array. In this example we change the home tab position on a single group page to 20.
$bp->bp_options_nav['groups']['home']['position'] = 20;
The same way we can change the name of the tabs, like so:
$bp->bp_options_nav['groups']['home']['name'] = __( 'Activity', 'buddypress' );
Now, let’s pretend we created a new tab called Group Information using the Groups API. We already specified that the tab will be the first one, but the Home tab is still the default tab. We can change this by modifying current_action, like so (only on a group page and if the current_action was set to ‘home’):
if ( $bp->current_action == 'home' )
$bp->current_action = 'group-information';
The only thing left to do is put the complete function into your plugin files and then add it to the bp_init hook
add_action( 'bp_init', 'shabushabu_change_group_tag_position' );
Let us know in the comments if you find this post useful!

Thanks Boris, very helpful. Looking forward to much more of this kind!
Hi,
I’m trying to use this to move the ‘profile’ tab on the profile page to the front and re-name it ‘my profile’. I have this code written, but it doesnt seem to work. Would you mind taking a look? the top portion (your original code, works. so i know I am at least calling it correctly)
function erocks_change_bp_tag_position()
{
global $bp;
if ( $bp->current_component == $bp->groups->slug )
{
$bp->bp_options_nav['groups']['home']['position'] = 20;
$bp->bp_options_nav['groups']['home']['name'] = __( 'Activity', 'buddypress' );
if ( $bp->current_action == 'home' )
$bp->current_action = 'group-information';
}
if ( $bp->current_component == $bp->profile->slug )
{
$bp->bp_options_nav['profile']['profile']['position'] = 20;
$bp->bp_options_nav['profile']['profile']['name'] = __( 'My Profile', 'buddypress' );
if ( $bp->current_action == 'profile' )
$bp->current_action = 'profile-information';
}
}
add_action( 'bp_init', 'erocks_change_bp_tag_position' );
nicely done, i gotta implement this on letscolab.org
With the above example. What if I created my own group tab then what will I do to make that my default?
This doesn’t seem to be working correctly.
Now I can’t go to the group home at all. Every time I click it goes back to my tab
i realize this is not exactly on subject, but i have a weblog utilizing the blogengine platform as well and i’m possessing issues with my comments displaying. is there a setting i am forgetting? possibly you might improve me out? give thanks to you.
Couple comments and questions:
I am still not clear on rearranging the order to the tabs, if I have Home, Forum, etc.
How do I make Forum the first tab?
Then, where are we supposed to store this function? Which file? bp-custom.php? And does that go in the plugin directory?
Also, you were saying to “The only thing left to do is put the complete function into your plugin files and then add it to the bp_init hook”
Which plugin files do we have to update? THanks!
Due to canonicalization of the urls nowadays setting the $bp->current_action will make the home tab inaccessible. Applying the bp_groups_default_extension filter and returning the slug of the default tab makes it work.