public
Last active

Add this functions in your functions.php in your template directory, to adjust the menue order of groups and profiles

  • Download Gist
menue order of groups and profiles
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
// 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');

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.