added a new field for nav and more
authorIan Weller <ian@gaslightmedia.com>
Fri, 13 Jan 2017 19:42:05 +0000 (14:42 -0500)
committerIan Weller <ian@gaslightmedia.com>
Fri, 13 Jan 2017 19:42:05 +0000 (14:42 -0500)
I added a new navigation area and I weeded out some Shipwreck specific
items.

front-page.php
functions.php
page.php
parts/off-canvas-menu.php

index 1d5c7f6..99dc896 100644 (file)
@@ -9,7 +9,7 @@
                 </div>
                 <div class="row">
                     <div class="small-11 small-centered columns">
-                        <?php get_template_part('parts/glm-blocks');?>
+                        <?php //get_template_part('parts/glm-blocks');?>
                     </div>
                 </div>
             </div>
index a9abe99..a82d067 100644 (file)
@@ -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 <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()
+      ));
+  }
+}
 /**
  * glm_page_menu
  *
@@ -295,8 +317,8 @@ function glm_get_background() {
     ) {
         $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
         $imageUrl = '<div class="featured-image" style="background: url(\''.$image_data[0].'\') no-repeat scroll 0px 0px / cover;;"></div>';
-    } else {
-        $imageUrl = '<div class="featured-image" style="background: url(\''.get_template_directory_uri().'/assets/shipwreck-museum.jpg\') no-repeat scroll 0px 0px / cover;;"></div>';
+//    } else {
+//        $imageUrl = '<div class="featured-image" style="background: url(\''.get_template_directory_uri().'/assets/shipwreck-museum.jpg\') no-repeat scroll 0px 0px / cover;;"></div>';
     }
     return $imageUrl; 
 }
index 0803407..acb0e36 100644 (file)
--- a/page.php
+++ b/page.php
 
                 </div>
             </div>
+<!--
             <div id="action-items" class="row show-for-medium-up">
                 <div class="small-3 columns">
-                    <a class="action-block" href="<?php echo get_page_link(199);?>"><img src="<?php echo get_template_directory_uri(); ?>/assets/action-item-donate.jpg"></a>
+                    <a class="action-block" href="<?php echo get_page_link(199);?>"><img src="<?php //echo get_template_directory_uri(); ?>/assets/action-item-donate.jpg"></a>
                 </div>
                 <div class="small-3 columns">
-                    <a class="action-block" href="<?php echo get_page_link(64);?>"><img src="<?php echo get_template_directory_uri(); ?>/assets/action-item-blog.jpg"></a>
+                    <a class="action-block" href="<?php echo get_page_link(64);?>"><img src="<?php //echo get_template_directory_uri(); ?>/assets/action-item-blog.jpg"></a>
                 </div>
                 <div class="small-3 columns">
-                    <a class="action-block" href="<?php echo get_page_link(169);?>"><img src="<?php echo get_template_directory_uri(); ?>/assets/action-item-memberships.jpg"></a>
+                    <a class="action-block" href="<?php echo get_page_link(169);?>"><img src="<?php //echo get_template_directory_uri(); ?>/assets/action-item-memberships.jpg"></a>
                 </div>
                 <div class="small-3 columns">
-                    <a class="action-block" href="<?php echo get_page_link(172);?>"><img src="<?php echo get_template_directory_uri(); ?>/assets/action-item-crews-quarters.jpg"></a>
+                    <a class="action-block" href="<?php echo get_page_link(172);?>"><img src="<?php //echo get_template_directory_uri(); ?>/assets/action-item-crews-quarters.jpg"></a>
                 </div>
             </div>
+-->
         </div>
 <?php get_footer(); ?>
index 7fb5949..307dec4 100644 (file)
@@ -4,48 +4,4 @@
         <input class="search-input" type="search" placeholder="" value="" name="s" id="off-search">
         <input type="submit" class="button" name="submit" value="Search">
     </form>
-    <ul id="off-sec-nav">
-        <?php $memberPage = get_post(169);?>
-        <?php if($memberPage):?>
-        <li><a href="<?php echo get_page_link($memberPage->ID);?>">Memberships</a></li>
-        <?php endif;?>
-        <?php $donationsPage = get_post(199);?>
-        <?php if($donationsPage):?>
-        <li><a href="<?php echo get_page_link($donationsPage->ID);?>">Donate</a></li>
-        <?php endif;?>
-        <?php $enewsPage = get_post(203);?>
-        <?php if($enewsPage):?>
-        <li><a href="<?php echo get_page_link($enewsPage->ID);?>">Enews</a></li>
-        <?php endif;?>
-        <?php $aboutPage = get_post(166);?>
-        <?php if($aboutPage):?>
-        <li><a href="<?php echo get_page_link($aboutPage->ID);?>">About</a></li>
-        <?php endif;?>
-        <?php $mediaPage = get_post(168);?>
-        <?php if($mediaPage):?>
-        <li><a href="<?php echo get_page_link($mediaPage->ID);?>">Media</a></li>
-        <?php endif;?>
-    </ul>
-    <ul class="offcavas-social-list">
-        <li><a target="_blank" href="http://www.facebook.com/pages/Paradise-MI/Great-Lakes-Shipwreck-Museum/53757748787?ref=sgm"><img alt="Facebook" src="<?php echo get_template_directory_uri(); ?>/assets/facebook-icon.png"></a></li>
-        <li><a target="_blank" href="#"><img alt="Youtube" src="<?php echo get_template_directory_uri(); ?>/assets/youtube-icon.png"></a></li>
-        <li><a target="_blank" href="#"><img alt="Trip Advisor" src="<?php echo get_template_directory_uri(); ?>/assets/trip-adviser-icon.png"></a></li>
-        <span class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>
-    </ul>
-    <ul class="client">
-        <li class="head">Administrative: US Weather Bureau Building</li>
-        <li>400 W. Portage Avenue,</li>
-        <li>Sault Ste Marie, MI 49783</li>
-        <li>906-635-1742</li>
-        <li>Toll Free Phone: 800-635-1742</li>
-    </ul>
-    <ul class="client">
-        <li class="head">Great Lakes Shipwreck Museum - Whitefish Point</li>
-        <li>18335 N. Whitefish Point Road,</li>
-        <li>Paradise, MI 49768</li>
-        <li>888-492-3747 &#8226; <?php $contactPage = get_post(167);?>
-                                            <?php if($contactPage):?>
-                                            <a href="<?php echo get_page_link($contactPage->ID);?>">Contact Us</a>
-                                        <?php endif;?></li>
-    </ul>
 </aside>