Exclude current post from recent posts looper?

Hi there – I see back in early 2021 there were questions about excluding the current post from a “recent posts” looper. At the time it sounded like it would eventually become built in as an option. I’m finally on the looper bandwagon and would love it if this has finally been implemented, but I don’t see how to do it.

Is it in there somewhere and I’m missing it?

1 Like

Hi @cheshiredave,

Thanks for reaching out.
Regretfully, there is no option to exclude the current post from the Recent Post looper. As it is mostly used in the pages or in the layout where we don’t need to exclude the current page or layout, it does not have such options. Still, I will check and if there is any possibility I will add this as a feature request so it might be taken into account in the future.

Thanks

Thank you! It is a very useful option when you’re looking at a single post layout and you have recent posts on the side (or a list of “every other post in this category”). I have to say it looks a little un-professional to not be able to exclude the current post from that list. I’m sure I could do it with a custom shortcode, but it would be great if it were built into the looper. I know I’m not the only one asking for this ability, so hopefully it makes it into a future release.

Thanks!
Cheshire

Hello Cheshire,

Regretfully, there is no option to exclude the current post but you can achieve this by using a Looper. For that, you need to set the Looper Provider as Query String and then you need to use this query in the Wp-query box.

Test-Page-Builder-Pro - 2022-06-01T003159.655

 post_type=post&posts_per_page=-1&post_status=publish&ignore_sticky_posts=1&order=DESC&post__not_in%5B0%5D={{dc:post:id}}

Hope it helps
Thanks

3 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.