reduced min height for landing page elements, added default image if a featured image...
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 12 Aug 2016 17:53:27 +0000 (13:53 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 12 Aug 2016 17:53:27 +0000 (13:53 -0400)
css/app.css
landing-page.php
scss/_main.scss

index 0639184..c8d5e34 100644 (file)
@@ -6928,7 +6928,7 @@ area:hover {
 
 #main-content .child-page {
   float: left;
-  min-height: 265px; }
+  min-height: 200px; }
 
 .child-image-container {
   text-align: center; }
index ea423ca..17a8cd2 100644 (file)
@@ -18,7 +18,7 @@ Template Name: Landing Page
         'orderby'        => 'menu_order'
     );
 
-
+    $post_parent = $post->ID;
     $parent = new WP_Query( $args );
     foreach ($parent as $p){
 //        echo '<pre>', print_r($p), '</pre>';
@@ -30,11 +30,12 @@ Template Name: Landing Page
                  <div class="row">
                    <?php if ( $parent->have_posts() ) : ?>
                      <?php while ( $parent->have_posts() ) : $parent->the_post(); ?>
-                       <?php $id = get_the_ID(); ?>
-
-                        <?php  
-                        $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'glm_block'); 
-//                    echo $image_data; 
+                       <?php $id = get_the_ID(); 
+                        if(get_post_thumbnail_id($id)){
+                            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'glm_block'); 
+                        } else {
+                            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_parent), 'glm_block'); 
+                        }
                      ?>
                     
                     <div id="<?php the_ID(); ?>" class="small-12 medium-4 large-3 columns child-page">
index 7b1b79c..a41c5d5 100644 (file)
@@ -561,7 +561,7 @@ area:hover {
 }
 #main-content .child-page {
     float: left;
-    min-height: 265px;
+    min-height: 200px;
 }
 .child-image-container{
     text-align: center;