From: Stephen Cameron Date: Tue, 21 Jan 2020 17:47:13 +0000 (+0100) Subject: WIP #3267 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e9c37a4ffe5cf290d88fa54cedae6ff1fa2a7147;p=ccv-wordpress.git WIP #3267 @1 --- diff --git a/wp-content/themes/CCV/resources/views/partials/content-scientific_news.blade.php b/wp-content/themes/CCV/resources/views/partials/content-scientific_news.blade.php index 8731dee..bb365a4 100644 --- a/wp-content/themes/CCV/resources/views/partials/content-scientific_news.blade.php +++ b/wp-content/themes/CCV/resources/views/partials/content-scientific_news.blade.php @@ -3,11 +3,13 @@ // exists outside the loop, we are sometimes getting data that is passed in and other times relying on // the global loop context. As a result, the code had to be modified a bit to work in both situations. $postID = isset($science_post) ? $science_post['ID'] : $post->ID; + $images = tr_posts_field('images', $postID); + $image = is_array($images) && isset($images[0]) ? wp_get_attachment_image_url($images[0], 'small') : ''; @endphp
> -
+
{{-- Just here as a proportional sizer thanks to the padding --}}