Last active
April 14, 2020 07:31
-
-
Save generatepress/bc55ba4d42f7cc26e91c to your computer and use it in GitHub Desktop.
Adding a third menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'generate_before_footer','generate_tertiary_navigation_position' ); | |
function generate_tertiary_navigation_position() | |
{ | |
?> | |
<nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" id="tertiary-navigation" role="navigation" class="tertiary-navigation"> | |
<div class="inside-navigation grid-container grid-parent"> | |
<?php do_action( 'generate_inside_navigation' ); ?> | |
<button class="menu-toggle tertiary-menu-toggle" aria-controls="primary-menu" aria-expanded="false"> | |
<?php do_action( 'generate_inside_mobile_menu' ); ?> | |
<span class="mobile-menu"><?php echo apply_filters('generate_mobile_menu_label', __( 'Menu', 'generate' ) ); ?></span> | |
</button> | |
<?php | |
wp_nav_menu( | |
array( | |
'theme_location' => 'primary', | |
'container' => 'div', | |
'container_class' => 'main-nav', | |
'menu_class' => '', | |
'fallback_cb' => 'generate_menu_fallback', | |
'items_wrap' => '<ul id="%1$s" class="%2$s ' . join( ' ', generate_get_menu_class() ) . '">%3$s</ul>' | |
) | |
); | |
?> | |
</div><!-- .inside-navigation --> | |
</nav><!-- #site-navigation --> | |
<?php | |
} | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment