Fix for if page has no featured image
authorLaury GvR <laury@gaslightmedia.com>
Tue, 21 Oct 2014 14:07:36 +0000 (10:07 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 21 Oct 2014 14:07:36 +0000 (10:07 -0400)
page.php

index 409eb30..3b52209 100644 (file)
--- a/page.php
+++ b/page.php
@@ -2,9 +2,11 @@
 
 <div class="row">
     <?php // get_sidebar('left'); ?>
-    <?php 
+    <?php if (has_post_thumbnail()) {
         $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
-        echo '<img class="small-12 columns" style="display: block; width: 100%; position: relative; padding: 0;" src="'.$image_data[0].'";>' 
+        echo '<img class="small-12 columns" style="display: block; width: 100%; position: relative; padding: 0;" src="'.$image_data[0].'";>';
+        }
+        
     ?>
     <div id="main" class="small-12 columns" role="main">