From f74af03425c795c87a33c571f9ba730c390c155c Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Mon, 13 Mar 2017 14:36:31 -0400 Subject: [PATCH] slowly working on layout I am slowly working on the layout for the site. I am mostly working on the header. --- index.php | 3 +-- lib/navigation.php | 28 +++++++++++++++++++++++++--- sections/front-page.php | 4 +--- sections/header.php | 22 ++++++++-------------- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/index.php b/index.php index 3f0fbc4..9a07cc9 100644 --- a/index.php +++ b/index.php @@ -7,8 +7,7 @@
'Site Navigation' + 'top-bar' => 'Site Navigation', + 'header-nav' => 'Second Header Navigation' )); /** @@ -19,7 +20,7 @@ if ( ! function_exists( 'glm_theme_top_bar' ) ) { 'after' => '', // after each link 'link_before' => '', // before each link text 'link_after' => '', // after each link text - 'depth' => 3, // limit the depth of the nav + 'depth' => 2, // limit the depth of the nav 'fallback_cb' => false, // fallback function (see below) 'walker' => new Glm_Theme_Top_Bar_Walker() )); @@ -51,13 +52,34 @@ function glm_get_mobile_nav_menu( $theme_location ) 'after' => '', // after each link 'link_before' => '', // before each link text 'link_after' => '', // after each link text - 'depth' => 5, // limit the depth of the nav + 'depth' => 2, // limit the depth of the nav 'fallback_cb' => false, // fallback function (see below) 'walker' => new Glm_Theme_Off_Canvas_Walker() )); return preg_replace( array( '%^]*>%', '%$%' ), '', $menu ); } +/** + * Header + */ +if ( ! function_exists( 'glm_theme_head_nav' ) ) { + function glm_theme_head_nav() { + 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' => 'header-nav', // 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' => 1, // limit the depth of the nav + 'fallback_cb' => false, // fallback function (see below) + )); + } +} + /** * Footer */ diff --git a/sections/front-page.php b/sections/front-page.php index 84d36de..41ce8e9 100644 --- a/sections/front-page.php +++ b/sections/front-page.php @@ -4,9 +4,7 @@
- +
diff --git a/sections/header.php b/sections/header.php index 38be909..e237328 100644 --- a/sections/header.php +++ b/sections/header.php @@ -1,19 +1,13 @@
-
- - - -

- -

- -

- +
+ +
+
+
+ +
+
\ No newline at end of file -- 2.17.1