Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adding a third menu
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