Featured image header of page
authorLaury GvR <laury@gaslightmedia.com>
Tue, 13 Jan 2015 18:26:53 +0000 (13:26 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 13 Jan 2015 18:26:53 +0000 (13:26 -0500)
page.php

index d54989b..216fc92 100755 (executable)
--- a/page.php
+++ b/page.php
@@ -1,7 +1,18 @@
 <?php get_header(); ?>
 <div class="row">
     <div class="small-12 columns side_space">
-        <img src="<?php bloginfo('template_url'); ?>/assets/banner_big.png">
+        <header id="still"
+        <?php
+            if (has_post_thumbnail()) {
+                    $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
+                    echo ' style="background: url('.$image_data[0].'); min-height: '.$image_data[2].'px;max-height: 400px; "';
+            }
+            else {
+                    echo ' style="display: none;"';
+            }
+        ?>
+        >
+        </header>
     </div>
 </div>
 <div id="main" class="row">