added community sidebar, added slogan to chamber page
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 12 May 2016 14:55:31 +0000 (10:55 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 12 May 2016 14:55:31 +0000 (10:55 -0400)
chamber-template.php
css/app.css
footer.php
front-page.php
functions.php
lib/navigation.php
scss/_main.scss

index 3d1a9bc..9c4bdcd 100644 (file)
@@ -12,7 +12,8 @@ get_header(); ?>
     <div id="content-wrapper">
         <div class="row">
             <div id="main-content" class="small-12 columns">
-                <h1 id="slogan">Welcome to Silver Lake Sand Dunes!</h1>
+                <h1 class="slogan">Silver Lake Sand Dunes Area</h1>
+                <h1 class="slogan">Chamber of Commerce</h1>
                 <img id="divide" src="<?php echo esc_url( get_template_directory_uri() );?>/assets/fancy-divider.png">
                 <?php if(have_posts()) : while(have_posts()): the_post();?>
                 <?php the_content();?>
index da185a9..3454583 100644 (file)
@@ -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; }
index bddee6e..8fd9452 100644 (file)
@@ -2,8 +2,8 @@
                             <div class="text-center">
                                 <ul id="quick-links">
                                     <li id="travel"><a href="<?php echo get_permalink(752); ?>"></a></li>
-                                    <li id="guide"><a href="http://www.bluetoad.com/publication/?m=36331&l=1/"></a></li>
-                                    <li id="chamber"><a href="<?php echo get_permalink(142); ?>"></a target="_blank"></li>
+                                    <li id="guide"><a href="<?php echo get_permalink(802); ?>"></a></li>
+                                    <li id="chamber" ><a target="_blank" href="<?php echo get_permalink(142); ?>"></a ></li>
                                     <li id="news"><a href="<?php echo get_permalink(145); ?>"></a></li>
                                     <li id="play"><a href="<?php echo get_permalink(143); ?>"></a></li>
                                 </ul>
index 5114297..27172ff 100644 (file)
@@ -4,7 +4,7 @@
     <div id="content-wrapper">
         <div class="row">
             <div id="main-content" class="small-12 columns">
-                <h1 id="slogan">Welcome to Silver Lake Sand Dunes!</h1>
+                <h1 class="slogan">Welcome to Silver Lake Sand Dunes!</h1>
                 <img id="divide" src="<?php echo esc_url( get_template_directory_uri() );?>/assets/fancy-divider.png">
                 <?php if(have_posts()) : while(have_posts()): the_post();?>
                 <?php the_content();?>
index ec913e1..aa51024 100644 (file)
@@ -145,7 +145,22 @@ function mytheme_search_loop() {
 
   <?php endwhile;
 }
-
+if ( ! function_exists( 'is_tree' ) ) {
+    function is_tree( $pid ) {
+        global $post;
+
+        if ( is_page($pid) )
+            return true;
+
+        $anc = get_post_ancestors( $post->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
 // 
index 8aa807f..1fc8795 100644 (file)
@@ -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 <a>
+          'after' => '',                                  // after each link </a>
+          '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.'</a><ul>';
     } else {
         echo '<h1><a href="'. get_permalink(142).'"';
-
-        echo '> CHAMBER </a></h1>';
+        if(is_page(239) || 239== $post->post_parent || is_tree(239)){
+            echo '> CHAMBER </a></h1>';
+        } else if(is_page(137) || 137 == $post->post_parent || is_tree(137)){
+            echo '> COMMUNITY </a></h1>';
+        }
         echo '<ul>';
     }
     foreach ($subs as $menu_item) {
index f3b815b..986e768 100644 (file)
@@ -4,7 +4,7 @@
 main {
     &.page-front {
         #content-wrapper {
-            h1#slogan {
+            h1.slogan {
                 text-transform: uppercase;
                 text-align: center;
                 margin-top: 35px;