When we go to an article, at the bottom of the page there is section "Ces articles peuvent aussi vous intéressez".
there are three articles displayed, but they are all the same. I do not understand what it does not work in my code, I would like to have the display of three different articles.
I created a custom module for the related article :
<div class="page-center content-wrapper">
<div class="blog-section">
<div class="blog-listing-wrapper cell-wrapper">
<div class="blog-section">
<div class="blog-listing-wrapper cell-wrapper">
<h3 class="hs-author-listing-header">Ces articles peuvent aussi vous intéressez</h3>
<div class="post-related">
{% for topic in content.topic_list %}
{% if loop.first %}
{% set related_posts = blog_recent_topic_posts('default', topic.slug, 4 ) %}
{% for post in related_posts %}
{% unless content.absolute_url == post.absolute_url %}
<div class="post-item">
<div class="post-inner">
<div class="hs-featured-image-wrapper" style="background: url({{ resize_image_url( content.post_list_summary_featured_image,400 ) }})
no-repeat; background-size:cover; ">
{% for tag in content.tag_list %} {% set t = t + 1 %} {% if t == 1 %}
<a class="topic-link tag-link" href="{{ blog_tag_url(group.id, tag.slug) }}">{{ tag.name }}</a> {% endif %} {% endfor %}
</div>
<div class="post-header">
<div class="date">
{{ content.publish_date_local_time.strftime('%d %B %Y') }}
</div>
<h2><a href="{{content.absolute_url}}">{{ content.name }}</a></h2>
<p>{{ content.post_summary|striptags|truncate(120, breakword=False, end='...') }}</p>
<div class="post-description-btn">
<a class="more-btn" href="{{ rec_post.absolute_url }}">Lire l'article </a>
</div>
</div>
</div>
</div>
{% endunless %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
Hello! Under my posts i have the section about related articules, but they seem to be random and i want to have a relation between the main post and the related post. I dont know if it is posibble to relate them by tag or topic.