I’m displaying multiple posts on my Website Page with the help of custom module. I’m pulling post with the help of following code:
{% set topic_one = blog_recent_topic_posts('BLOG ID', topic_name_1, 10) %}
{% set topic_two = blog_recent_topic_posts('BLOG ID', topic_name_2, 10) %}
{% set topic_three = blog_recent_topic_posts('BLOG ID', topic_name_3, 10) %}
{% set topic_posts = (topic_one + topic_two + topic_three)|sort(true, false, 'publish_date') %}{% for topic_post in topic_posts %}Post content{% endfor %}
The problem is, if the blog post has both topic_one and topic_two tagged, then that blog post will get displayed twice. I want to avoid this duplication. Can anyone help me with this?