From: Ian Weller Date: Fri, 13 Jan 2017 19:49:56 +0000 (-0500) Subject: adding new nav area X-Git-Tag: v1.0.0^2~149 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2f40558182399ad8e67e2f818307f9175c43561c;p=WP-Themes%2Fbaragacounty.git adding new nav area I added a new navigation area. --- diff --git a/lib/navigation.php b/lib/navigation.php index 66b369f..4650a4e 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -2,7 +2,8 @@ register_nav_menus(array( 'top-bar' => 'Site Navigation', - 'footer' => 'Footer Navigation' + 'footer' => 'Footer Navigation', + 'second-header' => 'Secondary Header Navigation' )); /** @@ -34,7 +35,27 @@ if ( ! function_exists( 'glm_theme_top_bar' ) ) { return preg_replace( array( '%^]*>%', '%$%' ), '', $menu ); } } - +/** + * Secondary Header Navigation +**/ +if ( ! function_exists( 'glm_theme_second_header' ) ) { + function glm_theme_second_header() { + wp_nav_menu(array( + 'container' => false, // remove nav container + 'container_class' => '', // class of container + 'menu' => '', // menu name + 'menu_class' => '', // adding custom nav class + 'theme_location' => 'second-header', // where it's located in the theme + 'before' => '', // before each link + 'after' => '', // after each link + 'link_before' => '', // before each link text + 'link_after' => '', // after each link text + 'depth' => 3, // limit the depth of the nav + 'fallback_cb' => false, // fallback function (see below) + 'walker' => new Glm_Theme_Top_Bar_Walker() + )); + } +} /** * Mobile off-canvas */