Problem nr1 i want 2 different menus. one for user that are logged in, and 1 one for users who is logged out.
If you’re just trying to hide a single link for non-logged in users, a couple lines of CSS can hide it.
#nav li.page-item-4 {
display: none;
}
.logged-in #nav li.page-item-4 {
display: inline-block;
}
You would just change the “.page-item-4” to whatever the page item number is on your site. Use Firebug or view source in browser to see.
If you wanted to create totally different menus. One for logged-out and one for logged-in. Then open up header.php and look for the navigation menu. Add a basic conditional to check if a user is logged in and then insert the menu name you’d like to use for each situation.
<div id="navigation" role="navigation">
<?php if ( is_user_logged_in() ) : ?>
<?php wp_nav_menu( array( 'container' => false, 'menu_id' => 'nav', 'theme_location' => 'primary', 'fallback_cb' => 'bp_dtheme_main_nav', 'menu' => 'member' ) ); ?>
<?php else : ?>
<?php wp_nav_menu( array( 'container' => false, 'menu_id' => 'nav', 'theme_location' => 'primary', 'fallback_cb' => 'bp_dtheme_main_nav', 'menu' => 'visitor' ) ); ?>
<?php endif; ?>
</div>
Note that you should insert the menu name for each menu that you create in the dashboard in the code above. For example:
'menu' => 'visitor'
That’s how I do it on http://solopracticeuniversity.com/