fixed feature image style.
authorIan Weller <ian@gaslightmedia.com>
Thu, 20 Apr 2017 20:43:46 +0000 (16:43 -0400)
committerIan Weller <ian@gaslightmedia.com>
Thu, 20 Apr 2017 20:43:46 +0000 (16:43 -0400)
I adjusted the placement of the feature image on interior pages.

functions.php

index 9b511e1..2f9cb5a 100644 (file)
@@ -238,10 +238,10 @@ function glm_get_header() {
     if ( has_post_thumbnail($post_id) && is_post_type('page')) {
         
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), "full");
-            echo ' style="background-image: url('.$image_data[0].');padding:0;padding-bottom:20%;background-position:top center;background-size: 100%;background-repeat:no-repeat;max-height: 250px; "';
+            echo ' style="background-image: url('.$image_data[0].');padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 250px; "';
         
     } else {
-            echo ' style="background-image: url('.get_template_directory_uri().'/assets/riverboat_boat-1.jpg);padding:0;padding-bottom:30%;background-position:top center;background-size:cover;background-repeat:no-repeat;max-height: 250px; "';
+            echo ' style="background-image: url('.get_template_directory_uri().'/assets/riverboat_boat-1.jpg);padding:0;padding-bottom:30%;background-position:center center;background-size:cover;background-repeat:no-repeat;max-height: 250px; "';
             echo ' class="no-featured"';
     }
     echo '>';