Skip to content

Instantly share code, notes, and snippets.

@svenl77
Created May 13, 2011 07:57
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svenl77/970170 to your computer and use it in GitHub Desktop.
Save svenl77/970170 to your computer and use it in GitHub Desktop.
Add this functions in your functions.php in your template directory, to adjust the menue order of groups and profiles
// Change the Profile nav tab order
function change_profile_tab_order() {
global $bp;
$order = ''; // Add the component slugs coma separated in the order you like to have the nav menu tabs
$order = str_replace(' ','',$order);
$order = explode(",", $order);
$i = 1;
foreach($order as $item) {
$bp->bp_nav[$item]['position'] = $i;
$i ++;
}
}
add_action( 'wp', 'change_profile_tab_order', 999 );
// Change the Group nav tab order
function change_groups_tab_order() {
global $bp;
$order = ''; // Add the component slugs coma separated in the order you like to have the nav menu tabs
$order = str_replace(' ','',$order);
$order = explode(",", $order);
$i = 1;
foreach($order as $item) {
$bp->bp_options_nav['groups'][$item]['position'] = $i;
$i ++;
}
}
add_action('wp', 'change_groups_tab_order');
@AlexandraLouise
Copy link

Hi Sven, This is fantastic. do you have any idea how you would change the "active" profile menu item from "activity" to "profile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment