Featured images on members should be above short desc, not as header
authorlaury <laury@gaslightmedia.com>
Thu, 11 Jan 2018 21:53:20 +0000 (16:53 -0500)
committerlaury <laury@gaslightmedia.com>
Thu, 11 Jan 2018 21:53:20 +0000 (16:53 -0500)
functions.php
glm-member-db/views/front/members/detail.html

index c4492e2..2703185 100644 (file)
@@ -75,22 +75,15 @@ function glm_get_header($memberID = false) {
     global $post;
     
     echo '<div';
-    if ((has_post_thumbnail() && $post->post_type == 'page') || is_page('member-detail')) {
-        if(!$memberID){
-            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-            $image_data = $image_data[0];
-            
-        } else {
-            $image_data = apply_filters('member_images',$memberID,true);
-        }
-        if (empty($image_data) || is_numeric($image_data)) {
-            echo ' style="background-image: url('.get_template_directory_uri().'/assets/default.jpg);height:0;padding:0;padding-bottom:22%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 420px; "';
-        } else {
-            echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:22%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 420px; "';
-        }
+    if ((has_post_thumbnail() && $post->post_type == 'page')) {
+        $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+        $image_data = $image_data[0];
+        echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:22%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 420px; "';
     } else if (!is_page('member-detail')) {
         echo ' style="background-image: url('.get_template_directory_uri().'/assets/default.jpg);height:0;padding:0;padding-bottom:22%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 420px; "';
-    } 
+    } else {
+        echo ' class="no-featured"';
+    }
     echo '>';
     echo '</div>';
     echo '<div class="row">';
index b933508..bb3b1fa 100644 (file)
                 {apply_filters('glm-member-db-front-members-detail-attributesTop', '', $member.id)}
                 
                 {if $featuredImage}
-                <!-- <div class="glm-member-detail-featured-image-wrapper small-12 columns">
+                 <div class="glm-member-detail-featured-image-wrapper small-12 columns">
                     <img src="{$glmPluginMediaUrl}/images/large/{$featuredImage}">
                     {if $featuredImageCaption}
                     <div class="glm-member-detail-featured-image-caption">
                         {$featuredImageCaption}
                     </div>
                     {/if}
-                </div> -->
+                </div> 
                 {/if}
                 <div id="glm-member-detail-intro-desc">
                     {if $member.short_descr && $settings.detail_show_short_descr}{$member.short_descr|nl2br}{/if}