Files
sage/resources/views/partials/header.blade.php
Nathan Knowler 824a2cc18c Only display <nav> if primary_navigation is set
The contents of the menu were being conditionally displayed, but it
would display an empty `<nav>` element if the menu location wasn’t set.
2021-10-08 09:13:37 -05:00

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>