Cleaner markup, no s tray box when no posts in category
authorLaury GvR <laury@gaslightmedia.com>
Wed, 10 Jun 2015 15:17:51 +0000 (11:17 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 10 Jun 2015 15:17:51 +0000 (11:17 -0400)
front-page.php
page.php
parts/blog-feed.php

index ef0c2d2..c9f06ce 100644 (file)
     </div>
     <div class="row">
         <div id="blog-feed" class="small-12 large-9 columns">
-            <div class="shadow-wrapper">
-                <div class="content-wrapper">
-                    <?php get_template_part("parts/blog-feed");?>
-                </div>
-            </div>
+            <?php get_template_part("parts/blog-feed");?>
         </div>
         <div id="side" class="large-3 show-for-large-up columns text-center">
             <div class="shadow-wrapper">
index 0c7277c..94ad91d 100644 (file)
--- a/page.php
+++ b/page.php
             </div>
             
             <div id="blog-feed">
-                <div class="shadow-wrapper">
-                    <div class="content-wrapper">
-                        <?php get_template_part("parts/blog-feed");?>
-                    </div>
-                </div>
+                <?php get_template_part("parts/blog-feed");?>
             </div>
         </div>
         <div id="side" class="large-3 show-for-large-up columns text-center">
index 0998199..8de66c3 100644 (file)
@@ -12,24 +12,29 @@ if (is_page(array("events","recreation","sailing","tennis","activities","beach")
     $args = array( 'category_name' => $cat_name,'numberposts' => 3, 'order_by' => 'date');
     $lastposts = get_posts( $args );
     if ($lastposts) { ?>
-        <div class="row wordpress-content">
-        <h1>Upcoming Events</h1>
-        <?php foreach($lastposts as $post) : setup_postdata($post); ?>
-            <div class="small-12 columns">
-                <?php $thumbnail = get_the_post_thumbnail($post->ID, array(130, 130)); ?>
-                <?php if ($thumbnail) { ?>
-                    <div class="small-3 columns blog-feed-image">
-                            <?php echo $thumbnail; ?>
+
+        <div class="shadow-wrapper">
+            <div class="content-wrapper">
+                <div class="row wordpress-content">
+                <h1>Upcoming Events</h1>
+                <?php foreach($lastposts as $post) : setup_postdata($post); ?>
+                    <div class="small-12 columns">
+                        <?php $thumbnail = get_the_post_thumbnail($post->ID, array(130, 130)); ?>
+                        <?php if ($thumbnail) { ?>
+                            <div class="small-3 columns blog-feed-image">
+                                    <?php echo $thumbnail; ?>
+                            </div>
+                            <div class="small-9 columns blog-feed-text">
+                        <?php } else { ?>
+                            <div class="small-12 columns blog-feed-text">
+                        <?php } ?>
+                        <h2><a class="read" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
+                        <p><?php echo the_advanced_excerpt('length=75&length_type=words&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,p,strong'); ?></p>
+                        <a class="read" href="<?php the_permalink(); ?>">read more...</a>
+                        </div>
                     </div>
-                    <div class="small-9 columns blog-feed-text">
-                <?php } else { ?>
-                    <div class="small-12 columns blog-feed-text">
-                <?php } ?>
-                <h2><a class="read" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
-                <p><?php echo the_advanced_excerpt('length=75&length_type=words&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,p,strong'); ?></p>
-                <a class="read" href="<?php the_permalink(); ?>">read more...</a>
+                <?php endforeach; ?>
                 </div>
             </div>
-        <?php endforeach; ?>
         </div>
     <?php } ?>
\ No newline at end of file