From 7888479df4df6ce512a477a8a577d2da69345e58 Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Wed, 6 Nov 2024 14:40:38 +0100 Subject: [PATCH] Show medium not full size of thumbnails in latest-posts block. --- inc/template-tags.php | 5 +++-- template-parts/content-archive.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index a6f4860..c7d23d1 100755 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -155,15 +155,16 @@ function sunflower_the_social_media_sharers() { * * @param boolean $styled_layout Is this a styled layout. * @param boolean $caption Show the caption. + * @param boolean $is_block Is latest news block. */ - function sunflower_post_thumbnail( $styled_layout = false, $caption = false ) { + function sunflower_post_thumbnail( $styled_layout = false, $caption = false, $is_block = false ) { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } global $post; - if ( is_singular() ) : + if ( is_singular() && ! $is_block ) : ?>
- +