Skip to content

Instantly share code, notes, and snippets.

@woogist
Created February 3, 2014 12:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogist/8783039 to your computer and use it in GitHub Desktop.
Save woogist/8783039 to your computer and use it in GitHub Desktop.
register another versions of the secondary menu in canvas under the mobile nevigation area.
add_action( 'woo_nav_inside', 'woo_custom_add_secondary_menu_to_mobile_nav', 10 );
function woo_custom_add_secondary_menu_to_mobile_nav () {
$menu_location = 'secondary-menu'; // Change this to be whichever menu location you want to add.
if ( has_nav_menu( $menu_location ) ) {
echo '<div id="' . $menu_location . '-container-mobile" class="col-full custom-menu-location">' . " ";
echo '<h3 class="secondary-menu">Secondary Menu</h3>';
wp_nav_menu( array( 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => $menu_location, 'menu_class' => 'nav fl', 'theme_location' => $menu_location ) );
echo '</div>
<!--/#' . $menu_location . '-container .col-full-->' . "";
}
} // End woo_custom_add_secondary_menu()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment