From 542b2041cf89503f191ab86f1c4ea71bb94eae78 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Fri, 9 Mar 2018 13:15:23 -0500 Subject: [PATCH] Increase member detail featured size to 1900x350 --- functions.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/functions.php b/functions.php index 0bfe9d8..eab7230 100644 --- a/functions.php +++ b/functions.php @@ -125,22 +125,20 @@ function glm_get_header() { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); if ($image_data[0]) { // If member detail, no member ID, and a featured image assigned in wp + // use assigned featured image and 18% padding-bottom for sizing $image_data = $image_data[0]; - echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:16%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "'; - + echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:18%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "'; } else { // If member detail, no member ID, and no featured image assigned in wp - echo ' style="background-image: url('.get_template_directory_uri().'/assets/default-header.jpg?v=1.0);height:0;padding:0;padding-bottom:16%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;"'; + // use default featured image and 18% padding-bottom for sizing + echo ' style="background-image: url('.get_template_directory_uri().'/assets/default-header.jpg?v=1.0);height:0;padding:0;padding-bottom:18%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;"'; echo ' class="featured-image no-featured"'; } - } else { // If member detail and a member ID provided $image_data = apply_filters('member_images',$memberID,true,'original'); - echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:16%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "'; + echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:18%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "'; } - - } else if (has_post_thumbnail() && !is_post_type('post') && !is_home()) { // If not member detail, have thumbnail, but isn't single post or blog home $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); -- 2.17.1