You could do something like this:
<?php
if ( is_user_logged_in() ) {
wp_nav_menu( array( 'theme_location' => 'logged-in-menu' ) );
} else {
wp_nav_menu( array( 'theme_location' => 'logged-out-menu' ) );
}
?>
EDIT:
Here is another try, same theory but different execution:
if ( is_user_logged_in() )
{
// Filter wp_nav_menu() to add additional links and other output
function new_nav_menu_items($items)
{
$homelink = '<li class="home"><a href="' . bp_loggedin_user_domain() . '">' . __('Profile') . '</a></li>';
$items = $homelink . $items;
return $items;
}
add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' );
}
Related Posts:
- How can I create an auto-populated menu that is automatically assigned to a location?
- Creating new dynamic menu including BP links [closed]
- How to Create a Custom WordPress Navigation Menu with the Code?
- Display link with current user’s username in it in Custom Menu
- BuddyPress – How to add logout in nav menu
- How can I detect whether a BuddyPress page is active from within my theme?
- Add Buddypress profile and messages link to WordPress menu [closed]
- Current User In Custom Menu Item URL [closed]
- How to add buddypress sub-menu items to other menus
- buddypress slug issues [closed]
- Dynamically exclude menu items from wp_nav_menu
- wp_nav_menu: show menu only if one exists, otherwise show nothing
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- Making breadcrumb with wp_nav_menu
- adding some custom html code to the wp_nav_menu function
- Renaming a WordPress Admin Menu
- How to add active class on current menu item page?
- How do you get the current-menu-item ID?
- Add Page ID class to nav menu items
- rename navigation menu label in wordpress theme by code
- menu entries are lost
- Nav Menu and display post count
- Automatically Add New Tags to Sub-menu
- Accesibility problems with dropdown menus in twentyten theme or others
- Error “The given object ID is not that of a menu item” on menu with 40+ items
- TwentyTwelve child theme mobile menu not working
- Theme menu in Admin Panel
- Adding post excerpt into navigation menu
- Editing WordPress Nav Menu Walker
- Convert WP Menu to a Drop Down for Mobile browser
- Did upgrading from 3.3 to 3.3.1 introduce breaking changes in the menu navigation?
- Menu / div of year and months of blog posts?
- How to replace the page url for the page slug in a menu link?
- Remove current class from sub menu items
- Getting menu items like get_pages
- How do I render a navigation menu like my theme does?
- Add css class to dropdown
- nav_menu not displaying custom menu
- WordPress Menu Prepends URL To My Anchors
- Automatically list top level menu item child pages
- Check if menu_item has children or has parent
- How to remove menu installed in wp-admin by a theme? [closed]
- Why is wordpress forcing https link generation?
- Container class not appearing on navigation menu
- pull non-wp site into content area of wordpress -or- pull wp header into non wp site?
- cross-site custom menu
- How to remove the HOME menu item
- WordPress template – How to add class to li tag if submenu exist
- How to get rid of the home link in nav menu?
- display menu as table layout
- How to change the location of the menu
- Want to add different text after each menu item
- How to create a menu item which is not a page
- How can I make a menu link visible only to admins (without plugins)?
- Page menu with one image link instead of page title?
- Is there a way to tell menu items to force non-SSL URLs?
- Trouble hiding menu on single page
- change hover color of specific menu link [closed]
- How can I make a WordPress sub-menu with a top-level that isn’t clickable?
- enqueue script during add menu items means before save menu items
- WordPress classes removed when using custom walker
- Get parents child pages
- Custom HTML output for registered navigation
- Show subpages of a category in a custom menu
- how to add home icon instead of text in wordpress menu
- How to add a menu that belongs to parent blog to all child-blogs?
- How to create this kind of sub-menu in new line?
- How to use wp_list_pages on a grandparent page
- Dropdown primary navigation menu not working
- Understanding with this WordPress code
- Link after WordPress
- Im having trouble centering menu items in footer due to “flexbox”
- When created sub-directory, can we create a new navbar?
- Is it all right to put the whole tag into template_part file?
- Mobile menu displays submenus on top of parent. Need it to display right below on an own line
- Misleading behaviour on Menu & Theme location
- How to build a menu that change style over a section
- Menu flickering with each refresh on Google Chrome [closed]
- Remove Double Menu in Mobile View and Have one Menu Only
- calling JS to custom menu design
- How i can get current menu id with multiple occurrence
- How to get rid of the bottom line in the navigation menu via CSS file?
- Links in new menu don’t work
- Vertical Menu items shifting to same line when window size increased [closed]
- Installing compact search in the main menu?
- Next/previous a-like single navigation
- How to create a menu super voice in WP?
- How to set up suhosin.ini for unlimited menus
- Somehow lost my MENU from my home page- help!
- How to completely remove the top section with the menu?
- Customizing Responsive Themes Menu [closed]
- How To Conditionally Change Menu In Same Theme Location
- Add menu to CMS page
- Not even able to Log in [closed]
- how can i get the page_ID in nav li [closed]
- How do i add logo in wordpress studiopress (glam theme)?
- how to add permalink/slug to wordpress custom link menu item
- Using walker to display all menu branches at once?
- How to add a class directly on a unordered list element that is a primary navigation
- How to change WP menu item type?