From: Anthony Talarico Date: Wed, 15 Feb 2017 14:48:10 +0000 (-0500) Subject: changing the glm header function to center the featured image if there is one X-Git-Tag: v1.0.0^2~28 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=9b1220b42f748da7ee21f06d3637a5fa401a0aa1;p=WP-Themes%2Fbeaverislandboatcompany.git changing the glm header function to center the featured image if there is one --- diff --git a/functions.php b/functions.php index 169fe9d..dd12a2d 100644 --- a/functions.php +++ b/functions.php @@ -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"';