Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: change the order of my menus

@mikkel251

Participant

hi Again i got a code from the internet that Work but i have to have it to speakt together with another code..
her is the first code:

function bbg_change_profile_tab_order() {
global $bp;

    $bp->bp_nav['profile']['position'] = 10;
    $bp->bp_nav['activity']['position'] = 20;
    $bp->bp_nav['blogs']['position'] = 30;
    $bp->bp_nav['friends']['position'] = 40;
    $bp->bp_nav['messages']['position'] = 50;
    $bp->bp_nav['groups']['position'] = 60;
    $bp->bp_nav['settings']['position'] = 70;
    
}
add_action('bp_setup_nav', 'bbg_change_profile_tab_order', 999 );

i have a profile menu code that it have to speak together with and that is this code here:

// Filter wp_nav_menu() to add profile link
add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
function my_nav_menu_profile_link($menu) { 	
	if (!is_user_logged_in())
		return $menu;
	else
		$profilelink = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '">' . __('Min profil') . '</a></li>';
		$menu = $menu . $profilelink;
		return $menu;
}

how do i do that so that i can move arount all my menu tabs 🙂

i hope you understand my problem 😀

Skip to toolbar