Changing Wordpress PHP to Show Different Menu to Logged In Users


Staff member
I'm building a membership website on Wordpress and would like to show a different navigation menu to logged in users.

Here is the current PHP code that displays the menu :

                <?php /* Our navigation menu. */ ?>
<?php if ( isset ($options['admired_remove_superfish']) &&  ($options['admired_remove_superfish']!="") )
                    wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) );
                    wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary', 'menu_class' => 'sf-menu','fallback_cb' => 'admired_page_menu'  ) );?>

Here's the PHP code that needs to replace that code :

    if ( wp_emember_is_member_logged_in() ) {
    wp_nav_menu( array( 'menu' => 'logged-in-members' ) );
  } else {
    wp_nav_menu( array( 'menu' => 'normal-visitor-menu' ) );

If I just replace the old code, with the newer code it will work, but the formatting is off. I need the Superfish part in the current code, but I'm not sure how to make it work in PHP.

I know this may be a little confusing, but I would appreciate any help. Thanks!

P.S. This is a tutorial from the plugin's site. I've been following it, but I somehow need to keep the Superfish in there. I'm sure not sure how to do it.

<a href="" rel="nofollow"></a>