If you’re using the Display Posts Shortcode multiple times in one page, you can use this to exclude already displayed posts from new shortcode queries. This will prevent duplicate posts.
If you have other, non-Display Posts queries running on the page and would like to exclude them as well, you’ll need to modify those queries to add the post ID to the global $dps_exclude
variable.
This code snippet goes in a core functionality plugin or Code Snippets.
Filters used:
display_posts_shortcode_args
display_posts_shortcode_output