Featured images on single posts.
authorLaury GvR <laury@gaslightmedia.com>
Wed, 22 Apr 2015 20:53:04 +0000 (16:53 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 22 Apr 2015 20:53:04 +0000 (16:53 -0400)
single.php

index 79adfa2..6e6d19d 100644 (file)
                         <div id="blog-posts-over" class="small-12 medium-10 columns">
                             <?php if(have_posts()):while (have_posts()) : the_post(); ?>
                                 <div class="row content" id="blog-posts-container">
+                                    <?php
+                                        if (has_post_thumbnail()) {
+                                                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
+                                                echo '<img src="'.$image_data[0].'"; height: auto;max-height: 400px; width: 100%;">';
+                                        }
+                                    ?>
                                     <div class="small-12 small-centered columns">
                                         <div class="row">
                                             <div class="small-12 columns">