From: Ian Weller Date: Fri, 13 Jan 2017 19:42:05 +0000 (-0500) Subject: added a new field for nav and more X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=6712336edeff3aa3dacb54feb9793fb081e78f8e;p=WP-Themes%2Fglmthemes%2Fshipwreck-theme.git added a new field for nav and more I added a new navigation area and I weeded out some Shipwreck specific items. --- diff --git a/front-page.php b/front-page.php index 1d5c7f6..99dc896 100644 --- a/front-page.php +++ b/front-page.php @@ -9,7 +9,7 @@
- +
diff --git a/functions.php b/functions.php index a9abe99..a82d067 100644 --- a/functions.php +++ b/functions.php @@ -48,7 +48,8 @@ function glm_get_menu_options() register_nav_menus(array( 'top-bar' => 'Site Navigation', //'mobile-off-canvas' => 'Mobile', - 'footer' => 'Footer' + 'footer' => 'Footer', + 'second-header' => 'Secondary Header Navigation' )); if ( ! function_exists( 'shipwreck_top_bar' ) ) { @@ -168,6 +169,27 @@ class Shipwreck_Offcanvas_Walker extends Walker_Nav_Menu { } endif; +/** + * 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() + )); + } +} /** * glm_page_menu * @@ -295,8 +317,8 @@ function glm_get_background() { ) { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); $imageUrl = ''; - } else { - $imageUrl = ''; +// } else { +// $imageUrl = ''; } return $imageUrl; } diff --git a/page.php b/page.php index 0803407..acb0e36 100644 --- a/page.php +++ b/page.php @@ -47,19 +47,21 @@ + diff --git a/parts/off-canvas-menu.php b/parts/off-canvas-menu.php index 7fb5949..307dec4 100644 --- a/parts/off-canvas-menu.php +++ b/parts/off-canvas-menu.php @@ -4,48 +4,4 @@ - - - -