adding featured image to home.php
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 4 Dec 2015 16:52:02 +0000 (11:52 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 4 Dec 2015 16:52:02 +0000 (11:52 -0500)
home.php

index 8b9ce0e..9e2dfc7 100644 (file)
--- a/home.php
+++ b/home.php
         <div id="blog-posts-over" class="small-12 medium-9 columns">
             <?php if(have_posts()) : while(have_posts()): the_post();?>
             <div class="row content blog-posts-container">
-                <div class="small-11 small-centered columns">
+                <!--<div class="small-11 small-centered columns"> -->
+                    <?php $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
+                    <?php if ($thumbnail) { ?>
+                    <div class="small-12 medium-4 columns text-center blog-feed-imgs">
+                        <?php echo $thumbnail; ?>
+                    </div>
+                    <div class="small-12 medium-8 columns blog-feed-contents">
+                        <?php } else { ?>
+                        <div class="small-12 columns blog-feed-content">
+                            <?php } ?>
                     <article id="<?php the_ID()?>" <?php post_class()?>>
                         <header class="entry-header">
                             <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>