Adding a new partial for the Address section
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 2 Jul 2015 18:04:36 +0000 (14:04 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 2 Jul 2015 18:04:36 +0000 (14:04 -0400)
Replacing all of the id="address" sections in the pages and using a
partial. Update footer section to contain a new line to link in the
emmet county website.

front-page.php
home.php
page.php
parts/address.php [new file with mode: 0644]
search.php
single.php

index a86cc4d..f8714d8 100755 (executable)
@@ -57,7 +57,7 @@
                                         <div>
 
                                             <div class="row">
-                                                <?php if (has_post_thumbnail( $post->ID )) { ?> 
+                                                <?php if (has_post_thumbnail( $post->ID )) { ?>
                                                 <div class="small-8 small-centered medium-4 medium-uncentered columns">
                                                     <?php echo get_the_post_thumbnail($post->ID, array(190, 190), array('class' => 'blog-excerpt-img-wrap')); ?>
                                                     </div>
@@ -96,7 +96,7 @@
                 <!--events-->
                 <div class="row">
                     <div id="h2_2" class="small-10 text-centered columns">
-                        
+
                         <h2 class="small-push-1"><?php echo date('Y');?> Holiday Schedule</h2>
                     </div>
                 </div>
                                 }
                             ?>
                             ></div>
-                            <div id="homepage_featured_caption"> 
+                            <div id="homepage_featured_caption">
                                      <?php echo get_post(get_post_thumbnail_id($homepage_ID))->post_excerpt; ?>
                             </div>
                         </div>
                 </div>
                 <!--/events-->
             </div>
-        </div>  
-    </div>
-    <div id="address" class="show-for-medium-up">
-        <div class="address-image">
-            <img class="left" src="<?php bloginfo('template_url'); ?>/assets/sm-logo.png">
-        </div>
-        <div class="address-text">
-            <p>Emmet County Department of Public Works<br>200 Division Street, G-76, Petoskey, MI 49770 &#8226; 231-348-0640</p>
         </div>
     </div>
+    <?php get_template_part('parts/address'); ?>
     <?php get_template_part('contentsidebar'); ?>
 </div>
-<?php get_footer(); ?>
\ No newline at end of file
+<?php get_footer(); ?>
index 58bdb1b..2d7a99e 100644 (file)
--- a/home.php
+++ b/home.php
@@ -1,7 +1,7 @@
 <?php get_header(); ?>
 <div class="row">
     <div id="blog-posts-over" class="small-12 medium-9 columns">
-        
+
         <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
         <div class="row content" id="blog-posts-container">
             <div class="small-11 small-centered columns">
         </div><!-- /#post-404 -->
         <?php endif;?>
     </div>
-    <div id="address" class="show-for-medium-up">
-        <div class="address-image">
-            <img class="left" src="<?php bloginfo('template_url'); ?>/assets/sm-logo.png">
-        </div>
-        <div class="address-text">
-            <p>Emmet County Department of Public Works<br>200 Division Street, G-76, Petoskey, MI 49770 &#8226; 231-348-0640</p>
-        </div>
-    </div>
+    <?php get_template_part('parts/address'); ?>
     <div id="blog-side-info" class="alignright small-12 medium-3">
-        
+
         <p>Recent Posts</p>
         <ul>
         <?php
@@ -64,8 +57,8 @@
             'order' => 'ASC'
             );
           $categories = get_categories($args);
-            foreach($categories as $category) { 
-              echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  } 
+            foreach($categories as $category) {
+              echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  }
             ?>
         </ul>
     </div>
index 4427fdc..a46cc01 100755 (executable)
--- a/page.php
+++ b/page.php
             <?php endif;?>
         </div>
     </div>
-    <div id="address" class="show-for-medium-up">
-        <div class="address-image">
-            <img class="left" src="<?php bloginfo('template_url'); ?>/assets/sm-logo.png">
-        </div>
-        <div class="address-text">
-            <p>Emmet County Department of Public Works<br>200 Division Street, G-76, Petoskey, MI 49770 &#8226; 231-348-0640</p>
-        </div>
-    </div>
+    <?php get_template_part('parts/address'); ?>
     <?php get_template_part('contentsidebar'); ?>
 </div>
-<?php get_footer(); ?>
\ No newline at end of file
+<?php get_footer(); ?>
diff --git a/parts/address.php b/parts/address.php
new file mode 100644 (file)
index 0000000..c2632f5
--- /dev/null
@@ -0,0 +1,9 @@
+<div id="address" class="show-for-medium-up">
+    <div class="address-image">
+        <img class="left" src="<?php bloginfo('template_url'); ?>/assets/sm-logo.png">
+    </div>
+    <div class="address-text">
+        <p>Emmet County Department of Public Works<br>200 Division Street, G-76, Petoskey, MI 49770 &#8226; 231-348-0640</p>
+        <p>For additional information on Emmet County, please visit <a href="http://www.emmetcounty.org/" target="_blank">www.emmetcounty.org</a></p>
+    </div>
+</div>
index 730d23c..6cf46cc 100644 (file)
@@ -1,9 +1,9 @@
 
-    
+
 <?php get_header(); ?>
 
 <div id="search-page" class="row">
-    
+
     <?php if (get_search_query()) { ?> <!-- This is to ensure empty search results are filtered. -->
     <h2 class="search-result-header small-12 columns">Search Results for "<?php echo get_search_query(); ?>"</h2>
         <div id="blog-posts-over" class="small-12 columns">
@@ -16,7 +16,7 @@
                                     <h2 class="">Page: <a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
                                     <hr>
                                 <?php the_post_thumbnail(); ?>
-                                    
+
                 <!-- Start of the Contextual/Highlight Search -->
                                 <?php
                                 // Configuration
@@ -69,9 +69,9 @@
                                 </p>
                                 <p>
                                   <a href="<?php the_permalink() ?>" rel="bookmark">Read this entry</a>
-                                </p>  
+                                </p>
                 <!-- End of the Contextual/Highlight Search -->
-                                
+
                                 <?php //echo the_advanced_excerpt('length=200&length_type=words&no_custom=1&ellipsis=%26hellip;'); ?>
                                 <footer class="entry-meta small-12 medium-6 medium-push-3 center">
 
             </div><!-- /#post-404 -->
             <?php endif;?>
         </div>
-        <div id="address" class="show-for-medium-up">
-            <div class="address-image">
-                <img class="left" src="<?php bloginfo('template_url'); ?>/assets/sm-logo.png">
-            </div>
-            <div class="address-text">
-                <p>Emmet County Department of Public Works<br>200 Division Street, G-76, Petoskey, MI 49770 &#8226; 231-348-0640</p>
-            </div>
-        </div>
+    <?php get_template_part('parts/address'); ?>
     <?php } else { ?>
         <h2 class="search-result-header small-12 columns"> Please enter a term to be searched.</h2>
     <?php } ?>
index ad4cc99..4513eff 100644 (file)
 
 
                             </header>
-                            
+
                             <div class="editor-content">
 
                             <?php echo the_content(); ?>
-                            
+
                             </div>
-                            
+
                             <footer class="entry-meta small-12 medium-6 medium-push-3 center">
-                                
+
                                 <?php $post_categories = wp_get_post_categories( get_the_ID() );
                                 $cats = array();
 
@@ -45,7 +45,7 @@
                                         echo '<a rel="category" title="View all posts in '. $tag->name . ' " href="'. $tag->slug .'">'. $tag->name .'</a>, ';
                                     }
                                 }
-                                
+
                                 echo ' on ';
                                 echo ' <span class="meta date"> ' . the_time('F jS, Y') . '. </span>';
                                 ?>
         </div><!-- /#post-404 -->
         <?php endif;?>
     </div>
-    <div id="address" class="show-for-medium-up">
-        <div class="address-image">
-            <img class="left" src="<?php bloginfo('template_url'); ?>/assets/sm-logo.png">
-        </div>
-        <div class="address-text">
-            <p>Emmet County Department of Public Works<br>200 Division Street, G-76, Petoskey, MI 49770 &#8226; 231-348-0640</p>
-        </div>
-    </div>
+    <?php get_template_part('parts/address'); ?>
     <div id="blog-side-info" class="alignright small-12 medium-3">
-        
+
         <p>Recent Posts</p>
         <ul>
         <?php
@@ -97,8 +90,8 @@
             'order' => 'ASC'
             );
           $categories = get_categories($args);
-            foreach($categories as $category) { 
-              echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  } 
+            foreach($categories as $category) {
+              echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  }
             ?>
         </ul>
     </div>