Conditional menu for registerd users/guests (Genesis framework)

I’m running Genesis Framework on WordPress and I have to display a different top menu for logged in users and a different one for unregistered users (guests).

I created the 2 menus in the WP backend > Appearance > Menus:

Read More
  • top-menu1 for guests
  • top-menu2 for registered users

Normally I’d have to just use this:

if( !is_user_logged_in() ){
    wp_nav_menu( array( 'primary' => 'top-menu1' ) );
} else {
    wp_nav_menu( array( 'primary' => 'top-menu2' ) );
}

Since this is Genesis though, I’d like you to point me to:

  • what’s the equivalent of the wp_nav_menu function?
  • how do I register the 2 menus?
  • what files do I have to modify?

Related posts

Leave a Reply