Skip to content

Commit 040a888

Browse files
authored
Ne pas afficher le bouton et le menu principal si aucun menu n'est défini #324
#324
1 parent 32257d1 commit 040a888

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/parts/common/header.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<strong><?php echo esc_html( get_bloginfo( 'name' ) ); ?></strong>
99
<span class="sr-only"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></span>
1010
</a>
11-
11+
<?php if ( has_nav_menu( 'menu-main' ) ) : ?>
1212
<button class="header__menu-toggle" aria-expanded="false" aria-controls="menu">
1313
<span></span>
1414
<span class="sr-only aria-expanded-false-text"><?php esc_html_e( 'Open the menu', 'beapi-frontend-framework' ); ?></span>
@@ -30,6 +30,7 @@
3030
?>
3131
</div>
3232
</nav>
33+
<?php endif; ?>
3334
</div>
3435
</div>
3536
</header>

0 commit comments

Comments
 (0)