Hi there,
I’m having an issue where a specific blog’s individual posts are showing posts multiple times in a custom module called Other Related Videos. Here is an example blog post where you can see posts repeated within the Other Related Videos module: Hardware Hipsters : FritsJurgens System Fx
These posts are created a single time in our backend, so I believe that the issue is coming from the module’s code. Below is the code in question:
<div id="related_posts_wrapper"><div id="related_posts_title"><h2>Other Recent Videos</h2></div><!--end related_posts_title-->{% set counter = 1 %} {% if content.topic_list %}<div id="portfoliolist">{% for topic in content.topic_list %}{% set related_posts = blog_recent_topic_posts('default', topic.slug, 4 ) %}{% for post in related_posts|sort(true, false, 'publish_date') %}{% if counter <= 3 %} {% if content.absolute_url != post.absolute_url %}{% set counter = counter + 1 %}<div class="portfolio"><div class="resource_guide"><div id="resource_guide_image"><a href="{{ post.absolute_url }}"><img src="{{ post.featured_image }}" loading="lazy" alt="{{ post.name }}"><span class="video_icon"><img src="https://resources.bridgeportworldwide.com/hubfs/Logos/logo-hardware-hipsters.png" alt="{{ post.name }}"></span></a></div><!--end resource_guide_image--><div id="resource_guide_text"><h3><a href="{{ post.absolute_url }}">{{ post.name }}</a></h3></div><!--end resource_guide_text--><div id="blog_card_date_topic"> <div class="blog_card_date"><p>{{ post.publish_date_localized }}</p></div><!--end blog_card_date--></div><!--end blog_card_date_topic--></div></div><!--end portfolio-->{% endif %}{% endif %}{% endfor %}{% endfor %}</div><!--end portfoliolist-->{% endif %}</div><!--end related_posts_wrapper-->
Is there anything here that stands out as causing this repeat issue?
Thank you,
MChe
