Skip to:
Content
Pages
Categories
Search
Top
Bottom

My profil link on menu header with submenu


  • planetoffitness
    Participant

    @planetoffitness

    Hey Guys 🙂

    I have a question, i think the solution is pretty easy, but i dont know how to do it.
    The buddypress bar with the dashboard is for subscribers not available (i want this). I put
    this code below instead in my functions php an deletet the navigation bar of buddypress.
    So after log in, i the header appears “my profil”. (if not logged in, there is no “my profil” link)

    
    // 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( '/' ) . '">' . __('Mein Profil') . '</a></li>';
    		$menu = $menu . $profilelink;
    		return $menu;
    }

    My question:

    Below “my profil” a want a submenu with
    – log out link (already created)
    – sitewide activity (already created)
    – members list (already created)

    I already have the pages for my submenu, but i dont know how to put them below “my profil”.

    Thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar