Skip to main content
1 of 2
chrisguitarguy
  • 21.5k
  • 5
  • 62
  • 99

You can just specify false as the fallback_cb argument of wp_nav_menu. Nothing will show up -- rather, wp_nav_menu will return false (echoing nothing out).

<?php
wp_nav_menu(
    array( 
        'theme_location' => $main_nav, 
        'menu_class'     => 'nav', 
        'container'      => '',
        'fallback_cb'    => false
    )
);
chrisguitarguy
  • 21.5k
  • 5
  • 62
  • 99