Changing Wordpress PHP to Show Different Menu to Logged In Users

admin

Administrator
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 :

Code:
                <?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' ) );
                else
                    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 :

Code:
<?php
    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="http://www.tipsandtricks-hq.com/wor...tion-menu-to-your-members-and-non-members-551" rel="nofollow">http://www.tipsandtricks-hq.com/wor...tion-menu-to-your-members-and-non-members-551</a>