I have a strange issue with my if/else test for "has_nav_menu()" I have three menu locations in the template and each is tested if a menu exist in the defined location. However this example below does not echo the warning i want when and if a menu does not exist. The first test works fine, but this one does not. What am i missing ?
<!-- Secondary Navigation Area -->
<div class="row">
<div class="small-12 columns">
<?php
if ( has_nav_menu( 'header-top' ) ) {
wp_nav_menu( array(
'theme_location' => 'header-top',
'container' => 'nav',
'menu_class' => 'right no-bullets no-margin',
'fallback_cb' => false,
));
} else {
/* echo Fallback code if no menu has been choosen from the dashboard */
echo '<p class="warning dark-bg">Her mangler det en meny. Venligst gå tilbake til kontrollpanelet, <strong>Utseende > Menyer > Bestem plassering</strong> og velg en meny.</p>';
}
?>
</div>
</div>
echo has_nav_menu('header-top')
return?