From d5968cd310bdff916453fd008ae108b68983b081 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 14 Jul 2017 08:50:18 -0400 Subject: [PATCH] Update the crop for the featured images to use center. Updating from top to center for the background-position of the featured images. --- functions.php | 6 +++--- style.css | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index eb528e7..6c64a6d 100644 --- a/functions.php +++ b/functions.php @@ -82,12 +82,12 @@ function glm_get_header() { if (has_post_thumbnail() && is_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:top center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;overflow-y: hidden; "'; + 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;overflow-y: hidden; "'; } else if(is_post_type('post') ){ - echo ' style="background-image: url('.get_template_directory_uri().'/assets/blog-default.png);height:0;padding:0;padding-bottom:20%;background-position:top center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;overflow-y: hidden;"'; + echo ' style="background-image: url('.get_template_directory_uri().'/assets/blog-default.png);height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;overflow-y: hidden;"'; echo ' class="no-featured"'; } else if(!has_post_thumbnail() && is_post_type('page')){ - echo ' style="background-image: url('.get_template_directory_uri().'/assets/page-default.png);height:0;padding:0;padding-bottom:20%;background-position:top center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;overflow-y: hidden;"'; + echo ' style="background-image: url('.get_template_directory_uri().'/assets/page-default.png);height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;overflow-y: hidden;"'; echo ' class="no-featured"'; } echo '>'; diff --git a/style.css b/style.css index 942182b..c1dc2b2 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: GreatLakesCenterfortheArts Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for GreatLakesCenterfortheArts -Version: 1.0.6 +Version: 1.0.10 */ -- 2.17.1