Increase member detail featured size to 1900x350
authorLaury GvR <laury@gaslightmedia.com>
Fri, 9 Mar 2018 18:15:23 +0000 (13:15 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 9 Mar 2018 18:15:23 +0000 (13:15 -0500)
functions.php

index 0bfe9d8..eab7230 100644 (file)
@@ -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");