reducing padding in the glm get header featured image function background image markup
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 23 Mar 2017 12:48:34 +0000 (08:48 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 23 Mar 2017 12:48:34 +0000 (08:48 -0400)
functions.php

index e668b3c..7ca0773 100644 (file)
@@ -103,12 +103,12 @@ function glm_get_header() {
     echo '<div class="header-image-background"';
     if ( 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:center bottom;background-size: cover;background-repeat:no-repeat;max-height: 250px; "';
+        echo ' style="background-image: url('.$image_data[0].');padding:0;padding-bottom:16%;background-position:center bottom;background-size: cover;background-repeat:no-repeat;max-height: 250px; "';
         
     } else if ( !is_post_type('page') ){        
         echo ' class="no-featured"';
     } else {
-        echo ' style="background-image: url('.get_template_directory_uri().'/assets/interior-pg-header-image.jpg);padding:0;padding-bottom:20%;background-position:center bottom;background-size:cover;background-repeat:no-repeat;max-height: 250px; "';
+        echo ' style="background-image: url('.get_template_directory_uri().'/assets/interior-pg-header-image.jpg);padding:0;padding-bottom:16%;background-position:center bottom;background-size:cover;background-repeat:no-repeat;max-height: 250px; "';
     }
     echo '>';
     echo '</div>';