Feb 15, 20202:35 AM - edited Feb 15, 20202:36 AM
Recognized Expert | Elite Partner
how to list a posts list without current post in a blog post.
SOLVE
{% set rec_posts = blog_recent_posts('default', 5) %}
{% for blog_post in rec_posts %}
{% if blog_post.absolute_url != request.full_url %} YOUR CONTENT HERE
{% endif %}
{% endfor %}
You can use an if statement inside your listing loop to check the current loops' url against the current post page's url.
If this answer solved your question, please mark it as the solution.
Feb 15, 20202:35 AM - edited Feb 15, 20202:36 AM
Recognized Expert | Elite Partner
how to list a posts list without current post in a blog post.
SOLVE
{% set rec_posts = blog_recent_posts('default', 5) %}
{% for blog_post in rec_posts %}
{% if blog_post.absolute_url != request.full_url %} YOUR CONTENT HERE
{% endif %}
{% endfor %}
You can use an if statement inside your listing loop to check the current loops' url against the current post page's url.
If this answer solved your question, please mark it as the solution.