If we're using multiple loops on a page, whether with Easy Posts, Repeaters or both, we may run into the same posts appearing multiple times. In this premium tutorial, we'll go through one way that we can prevent duplicate posts from being included on the page.

Live Demo

In the demo, all of the Easy Posts and Repeater elements are just fetching the latest posts, but none of the posts are seen twice on the page.

Also, notice as we click each post the current post is also removed from all of the repeaters and easy post loops. This is useful when building single post templates where we have 'latest posts' or similar and we don't want to include the current post in the list.

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($37/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.

One comment on “Excluding Duplicate Posts from Repeaters & Easy Posts in Oxygen”

magnifiercross
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: