From 7dd5864f41a4b12e7ca7a1ec074d42a848551b1a Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 11 Apr 2016 10:52:15 -0400 Subject: [PATCH] adding footer menu, registerring nav menu --- lib/navigation.php | 25 ++++++++++++++++++++++++- parts/off-canvas-menu.php | 2 ++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/lib/navigation.php b/lib/navigation.php index f5b5d91..6b51f58 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -1,7 +1,8 @@ 'Site Navigation' + 'top-bar' => 'Site Navigation', + 'footer' => 'Footer Navigation' )); /** @@ -25,6 +26,27 @@ if ( ! function_exists( 'glm_theme_top_bar' ) ) { )); } } +/** + * Footer + */ +if ( ! function_exists( 'glm_theme_footer' ) ) { + function glm_theme_footer() { + 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' => 'footer', // 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 @@ -34,6 +56,7 @@ if ( ! function_exists( 'glm_theme_mobile_off_canvas' ) ) { echo '
'; echo '
'; } } diff --git a/parts/off-canvas-menu.php b/parts/off-canvas-menu.php index b75ee03..5f42dc5 100644 --- a/parts/off-canvas-menu.php +++ b/parts/off-canvas-menu.php @@ -1,5 +1,6 @@