<?php
/* @var \Tangibledesign\Framework\Widgets\BlogPost\RelatedBlogPostsWidget $mhCurrentWidget */
global $mhCurrentWidget;

$mhRelatedBlogPosts = $mhCurrentWidget->getRelatedBlogPosts();
if ($mhRelatedBlogPosts->isEmpty()) {
    return;
}
?>
<div class="myhome-related-blog-posts">
    <h3 class="myhome-related-blog-posts__label">
        <?php echo esc_html(tdf_string('related_posts')); ?>
    </h3>

    <div class="myhome-related-blog-posts__list">
        <?php
        global $mhBlogPost;
        foreach ($mhRelatedBlogPosts as $mhBlogPost) : ?>
            <?php get_template_part('templates/partials/post_card'); ?>
        <?php endforeach; ?>
    </div>
</div>
