changing the glm header function to center the featured image if there is one
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 15 Feb 2017 14:48:10 +0000 (09:48 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 15 Feb 2017 14:48:10 +0000 (09:48 -0500)
functions.php

index 169fe9d..dd12a2d 100644 (file)
@@ -77,7 +77,7 @@ function glm_get_header() {
 
     if (has_post_thumbnail()) {
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-            echo ' style="background-image: url('.$image_data[0].');height:auto;padding:0 0 34%;background-position:top center;background-size: cover;background-repeat:no-repeat; "';
+            echo ' style="background-image: url('.$image_data[0].');height:auto;padding:0 0 34%;background-position:center center;background-size: cover;background-repeat:no-repeat; "';
     } else {
             echo ' style="background-image: url('.get_template_directory_uri().'/assets/interior-page-header.jpg);height:auto;padding:0 0 34%;background-position:top center;background-size: cover;background-repeat:no-repeat;"';
             echo ' class="no-featured"';