modified id for menus in header and js

This commit is contained in:
jorge 2022-12-02 17:55:19 +01:00
parent cf2d611a09
commit bd41d7332f
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@
<?php endif; ?> <?php endif; ?>
</div><!-- .site-branding --> </div><!-- .site-branding -->
<nav id="site-navigation" class="main-navigation"> <nav id="site-navigation-main" class="main-navigation">
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'ofisuport' ); ?></button> <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'ofisuport' ); ?></button>
<?php <?php
wp_nav_menu( wp_nav_menu(
@ -60,7 +60,7 @@
</div> </div>
<div class="secondary"> <div class="secondary">
<?php the_header_image_tag(); ?> <?php the_header_image_tag(); ?>
<nav id="site-navigation" class="secondary-navigation"> <nav id="site-navigation-secondary" class="site-navigation secondary-navigation">
<button class="menu-toggle" aria-controls="secondary-menu" aria-expanded="false"><?php esc_html_e( 'Secondary Menu', 'ofisuport' ); ?></button> <button class="menu-toggle" aria-controls="secondary-menu" aria-expanded="false"><?php esc_html_e( 'Secondary Menu', 'ofisuport' ); ?></button>
<?php <?php
wp_nav_menu( wp_nav_menu(

View File

@ -5,7 +5,7 @@
* navigation support for dropdown menus. * navigation support for dropdown menus.
*/ */
( function() { ( function() {
const siteNavigation = document.getElementById( 'site-navigation' ); const siteNavigation = document.getElementById( 'site-navigation-main' );
// Return early if the navigation doesn't exist. // Return early if the navigation doesn't exist.
if ( ! siteNavigation ) { if ( ! siteNavigation ) {