updating feature image call master
authorIan Weller <ian@gaslightmedia.com>
Thu, 18 May 2017 20:11:35 +0000 (16:11 -0400)
committerIan Weller <ian@gaslightmedia.com>
Thu, 18 May 2017 20:11:35 +0000 (16:11 -0400)
I updated the feature image call on the original glmTheme.

root/functions.php

index e56c988..e5f35fc 100644 (file)
@@ -75,7 +75,7 @@ function glm_site_scripts()
 function glm_get_header() {
     echo '<div';
 
 function glm_get_header() {
     echo '<div';
 
-    if (has_post_thumbnail()) {
+    if (has_post_thumbnail() && $post->post_type == 'page') {
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
             echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "';
     } else {
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
             echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "';
     } else {