updates for blocks
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 3 Mar 2016 21:04:37 +0000 (16:04 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 3 Mar 2016 21:04:37 +0000 (16:04 -0500)
landing-page.php

index 86cc198..3dcc6ee 100644 (file)
@@ -38,7 +38,23 @@ Template Name: Landing Page
                         </a>
                     </li>
                      <?php $imageSrc = null; ?>
-               <?php } ?>
+                <?php } ?>
+                <?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( $post_image_id, 'glm_block2_3', false); ?>
+                        <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"';}?>>
+                            <?php endif;?>
+                                <img src="<?php echo $thumbnail[0]; ?>"/>
+                                <h5><?php echo $block->post_title;?></h5>
+                            <?php if($block->url):?>
+                            </a>
+                            <?php endif;?>
+                        </li>
+                    <?php endforeach;?>
+                <?php endif;?>
 <!--
                 <li class="small-text-center medium-text-left landing-item"><a><img src="<?php bloginfo('template_url');?>/assets/landing-img/Arts-and-Entertainment.jpg"><h5>Arts & Entertainment</h5></a></li>
                 <li class="small-text-center medium-text-left landing-item"><a><img src="<?php bloginfo('template_url');?>/assets/landing-img/Bicycling.jpg"><h5>Bicycling</h5></a></li>