fix bug in getting correct post id for thumbs
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 3 Mar 2016 21:07:51 +0000 (16:07 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 3 Mar 2016 21:07:51 +0000 (16:07 -0500)
landing-page.php

index d89168a..8f0bdb4 100644 (file)
@@ -42,7 +42,8 @@ Template Name: Landing Page
                 <?php if(function_exists('fetch_all_glm_blocks')):?>
                 <?php $blocks = fetch_all_glm_blocks(7591);?>
                     <?php foreach ($blocks as $block):?>
-                        <?php $thumbnail = wp_get_attachment_image_src( $block->ID, 'landing_page'); ?>
+                        <?php $post_image_id = get_post_thumbnail_id($block->ID); ?>
+                        <?php $thumbnail = wp_get_attachment_image_src( $post_image_id, 'landing_page'); ?>
                         <li class="small-text-center medium-text-left landing-item">
                             <?php if($block->url):?>
                             <a href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>