A simple way to achieve that is to create two separate Navigation Menus (/wp-admin/nav-menus.php
), and in your theme use the following:
// Reference:
// http://codex.wordpress.org/Function_Reference/is_user_logged_in
// http://codex.wordpress.org/Function_Reference/wp_nav_menu
if( is_user_logged_in() ) {
wp_nav_menu( array( 'theme_location' => 'logged-users' ) );
} else {
wp_nav_menu( array( 'theme_location' => 'not-logged-users' ) );
}
Instead of theme_location
, you can use the menu name directly, check the documentation for wp_nav_menu
.
And you’d probably would like to use the function is_user_logged_in
in the template files for the Registration and Directory pages.