From: Steve Sutton Date: Thu, 29 Oct 2015 20:08:39 +0000 (-0400) Subject: Update the image size for the glm blocks X-Git-Tag: v1.0.0^2~102 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=20dbd037a9305d7a98435c02f91d228302160df9;p=WP-Themes%2Fbpla.git Update the image size for the glm blocks Use custom image size of 305 x 215 and crop --- diff --git a/functions.php b/functions.php index 4124e8e..7ef15bd 100644 --- a/functions.php +++ b/functions.php @@ -321,6 +321,7 @@ add_action('after_setup_theme', 'bpla_theme_setup'); function bpla_theme_setup() { add_image_size( 'bpla-drop-down', 219, 169, true ); + add_image_size( 'glm-block-thumbnail', 305, 215, true ); } // End of the Contextual/Highlight Search functions ?> diff --git a/parts/glm-blocks.php b/parts/glm-blocks.php index 46d1f85..7887768 100644 --- a/parts/glm-blocks.php +++ b/parts/glm-blocks.php @@ -7,7 +7,11 @@ url):?> externalUrl){echo ' target="_blank"';}?>> - thumbnail;?> + thumbnail = get_the_post_thumbnail( + $block->ID, 'glm-block-thumbnail', array('class' => 'aligncenter') + ); + echo $block->thumbnail;?> url):?>