Header image featured image shows up on inside pages
authorLaury GvR <laury@gaslightmedia.com>
Fri, 20 Mar 2015 20:44:16 +0000 (16:44 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 20 Mar 2015 20:44:16 +0000 (16:44 -0400)
front-page.php
page.php

index 8b8f5e6..cbf04a5 100644 (file)
@@ -15,6 +15,7 @@
             <div class="small-12 columns">
                 <?php if(have_posts()) : while(have_posts()): the_post();?>
                 <?php the_content();?>
+                
                 <?php endwhile; else:?>
                 <p><?php _e('Sorry, no posts yet');?></p>
                 <?php endif;?>
index 75ebd12..f763a52 100644 (file)
--- a/page.php
+++ b/page.php
@@ -7,6 +7,10 @@
                              get_template_part('parts/bread-crumbs');
                              ?>
                          </div>
+                        <?php if (has_post_thumbnail()) {
+                            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+                            echo '<header style="background: url('.$image_data[0].');min-height: '.$image_data[2].'px; max-height: 400px; "></header>';
+                        }?>
                          <div class="row">
                             <div class="small-12 columns">
                                     <?php if(have_posts()) : while(have_posts()): the_post();?>