From 20dbd037a9305d7a98435c02f91d228302160df9 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 29 Oct 2015 16:08:39 -0400 Subject: [PATCH] Update the image size for the glm blocks Use custom image size of 305 x 215 and crop --- functions.php | 1 + parts/glm-blocks.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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):?> -- 2.17.1