Created
February 3, 2014 12:29
-
-
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.
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( '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