added glm blocks image size hook
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 21 Jan 2016 14:14:03 +0000 (09:14 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 21 Jan 2016 14:14:03 +0000 (09:14 -0500)
functions.php
parts/glm-blocks.php

index ec062cf..f265b8d 100644 (file)
@@ -144,7 +144,7 @@ function mytheme_search_loop() {
 
 add_action('thematic_searchloop', 'mytheme_search_loop');
 // End of the Contextual/Highlight Search functions
-//add_image_size('glm_blocks', '570', '280', true);
+add_image_size('glm_blocks', '570', '280', true);
 
 
 ?>
index 3a9e318..0640165 100644 (file)
@@ -6,7 +6,7 @@
     <div class="small-11 small-centered medium-uncentered medium-6 columns">
         <div class="row collapse">
             <?php $post_image_id = get_post_thumbnail_id($block->ID); ?>
-           <?php $thumbnail = wp_get_attachment_image_src( $post_image_id, 'small', false); ?>
+           <?php $thumbnail = wp_get_attachment_image_src( $post_image_id, 'glm_blocks', false); ?>
             <div id="block-<?php echo $count; ?>" class="small-12 columns blocks" style="background: url('<?php echo $thumbnail[0]; ?>') no-repeat ; background-size: cover";> 
                 <?php if($block->url):?>
                 <a href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>