The contents of the menu were being conditionally displayed, but it would display an empty `<nav>` element if the menu location wasn’t set.
12 lines
312 B
PHP
12 lines
312 B
PHP
<header class="banner">
|
|
<a class="brand" href="{{ home_url('/') }}">
|
|
{{ $siteName }}
|
|
</a>
|
|
|
|
@if (has_nav_menu('primary_navigation'))
|
|
<nav class="nav-primary">
|
|
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}
|
|
</nav>
|
|
@endif
|
|
</header>
|