From 778d72d5345ebeaba77fbb4727fc24d51c4ce4bc Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 12 May 2016 10:55:31 -0400 Subject: [PATCH] added community sidebar, added slogan to chamber page --- chamber-template.php | 3 ++- css/app.css | 2 +- footer.php | 4 ++-- front-page.php | 2 +- functions.php | 17 +++++++++++++++- lib/navigation.php | 48 ++++++++++++++++++++++++++++++++++++++------ scss/_main.scss | 2 +- 7 files changed, 65 insertions(+), 13 deletions(-) diff --git a/chamber-template.php b/chamber-template.php index 3d1a9bc..9c4bdcd 100644 --- a/chamber-template.php +++ b/chamber-template.php @@ -12,7 +12,8 @@ get_header(); ?>
-

Welcome to Silver Lake Sand Dunes!

+

Silver Lake Sand Dunes Area

+

Chamber of Commerce

diff --git a/css/app.css b/css/app.css index da185a9..3454583 100644 --- a/css/app.css +++ b/css/app.css @@ -6426,7 +6426,7 @@ header { left: auto !important; float: right !important; } -main.page-front #content-wrapper h1#slogan { +main.page-front #content-wrapper h1.slogan { text-transform: uppercase; text-align: center; margin-top: 35px; } diff --git a/footer.php b/footer.php index bddee6e..8fd9452 100644 --- a/footer.php +++ b/footer.php @@ -2,8 +2,8 @@
diff --git a/front-page.php b/front-page.php index 5114297..27172ff 100644 --- a/front-page.php +++ b/front-page.php @@ -4,7 +4,7 @@
-

Welcome to Silver Lake Sand Dunes!

+

Welcome to Silver Lake Sand Dunes!

diff --git a/functions.php b/functions.php index ec913e1..aa51024 100644 --- a/functions.php +++ b/functions.php @@ -145,7 +145,22 @@ function mytheme_search_loop() { ID ); + foreach ( $anc as $ancestor ) { + if( is_page() && $ancestor == $pid ) { + return true; + } + } + return false; + } +} add_action('thematic_searchloop', 'mytheme_search_loop'); // End of the Contextual/Highlight Search functions // diff --git a/lib/navigation.php b/lib/navigation.php index 8aa807f..1fc8795 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -3,7 +3,8 @@ register_nav_menus(array( 'top-bar' => 'Site Navigation', 'footer' => 'Footer Navigation', - 'chamber' => 'Chamber Navigation' + 'chamber' => 'Chamber Navigation', + 'community' => 'Community Navigation' )); /** @@ -48,6 +49,27 @@ if ( ! function_exists( 'glm_theme_footer' ) ) { )); } } +/* + * Community & Service Menu + */ +if ( ! function_exists( 'glm_theme_community' ) ) { + function glm_theme_community() { + 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' => 'community', // 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() + )); + } +} /* * Chamber Menu */ @@ -211,10 +233,21 @@ function glm_side_menu($mobile = false) { global $post; $sideMenu = $allMenu = $pageMenuId = array(); + + if(is_page(239) || 239== $post->post_parent || is_tree(239)){ + if (($locations = get_nav_menu_locations()) && isset($locations['chamber'])){ + $menu = wp_get_nav_menu_object($locations['chamber']); + } + } + if(is_page(137) || 137 == $post->post_parent || is_tree(137)){ + if (($locations = get_nav_menu_locations()) && isset($locations['community'])){ + $menu = wp_get_nav_menu_object($locations['community']); + } + } - if (($locations = get_nav_menu_locations()) && isset($locations['chamber'])) { - $menu = wp_get_nav_menu_object($locations['chamber']); - } +// if (($locations = get_nav_menu_locations()) && isset($locations['chamber'])) { +// $menu = wp_get_nav_menu_object($locations['chamber']); +// } $menu_items = wp_get_nav_menu_items($menu->term_id); foreach ((array) $menu_items as $key => $menu_item) { @@ -268,8 +301,11 @@ function glm_side_menu($mobile = false) { echo '>'.$pageHead->title.'
    '; } else { echo '

    CHAMBER

    '; + if(is_page(239) || 239== $post->post_parent || is_tree(239)){ + echo '> CHAMBER '; + } else if(is_page(137) || 137 == $post->post_parent || is_tree(137)){ + echo '> COMMUNITY '; + } echo '
      '; } foreach ($subs as $menu_item) { diff --git a/scss/_main.scss b/scss/_main.scss index f3b815b..986e768 100644 --- a/scss/_main.scss +++ b/scss/_main.scss @@ -4,7 +4,7 @@ main { &.page-front { #content-wrapper { - h1#slogan { + h1.slogan { text-transform: uppercase; text-align: center; margin-top: 35px; -- 2.17.1