I saw this post that is very similar to my question, but there is no answer:
I’m experimenting with building a new front page to my site using query loops, kind of like how WPSP used to be used.
If I have multiple query loop blocks on the same page, is there a way to make sure that they do not show the same post multiple times on the same page?
I know there is the offset parameter, which works fine for doing this when the query loops are the same but the design changes. Like having a larger featured post at the top.
My Scenario is more like having a 6 posts displayed …
I’ve created two blocks to be used at the bottom of single posts, one to show related posts and one to show latest posts. But I’m getting duplicate posts in these. Any way to prevent the duplicates?
Help Us Beta Test Our Own Fantasy Golf System -- for FREE!
Support provided a slick idea to this problem that works pretty well for what I was trying to accomplish, setting query loops for Related Posts and Latest News on each post.
First, set the dynamic Related Posts block for all the Categories you want shown on a post.
Then in the Latest News block, in the container that holds the query loop, add a parameter to Exclude Taxonomies by Category, then under Select Terms exclude ‘Current Post Terms’.
That will prevent the duplication, since it’s blocking the category of the current post in Latest News.
Clever and clean.
Neat solution. Thanks for sharing it.
It still doesn’t solve for what you asked about, Dan, having multiple blocks of different Categories on the same page with no duplications.
That process is doable in WP, as I’ve used other themes with that functionality. If someone can solve for that, I have a use for it…
For example detail to my above statement, I previously used a magazine theme called Presso that allowed me to create a custom page with a featured post at the top, a Latest News section with a dozen posts of mixed categories following that, then 6 different Category blocks of one story each below that, all on the same page. Then I could check a box on that page titled ‘Prevent Duplicate Posts’.
If someone at Generate Blocks would like a copy of that theme to see the magic underlying that checkbox, I’m happy to supply it…