diff --git a/public/app/themes/clarity/src/components/c-article-item/view-blog-feed.php b/public/app/themes/clarity/src/components/c-article-item/view-blog-feed.php index 92d230eed..c7484e700 100644 --- a/public/app/themes/clarity/src/components/c-article-item/view-blog-feed.php +++ b/public/app/themes/clarity/src/components/c-article-item/view-blog-feed.php @@ -16,17 +16,17 @@ $thumbnail = get_the_post_thumbnail_url($id, 'user-thumb'); $thumbnail_alt = get_post_meta(get_post_thumbnail_id($id), '_wp_attachment_image_alt', true); -// TODO: Why is this here? It's not used. -// If it should be here, make sure to update `Search->mapPostResult()` $oAuthor = new Authors(); $authors = $oAuthor->getAuthorInfo($id); -$author = $post->post_author; -$author_display_name = $author ? get_the_author_meta('display_name', $author) : ''; +$author = $authors[0] ?? false; +$author_display_name = $author['name'] ?? false; +$thumbnail = get_the_post_thumbnail_url($id, 'user-thumb'); +$thumbnail_alt = get_post_meta(get_post_thumbnail_id($id), '_wp_attachment_image_alt', true); + if (!$thumbnail) { - // Mutate thumbnail with author image. - $thumbnail = $author ? get_the_author_meta('thumbnail_avatar', $author) : false; + $thumbnail = $author['thumbnail_url'] ?? false; $thumbnail_alt = $author_display_name; }