| 开发者 | itamarsilvacc |
|---|---|
| 更新时间 | 2026年7月17日 13:30 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
core/query (Query Loop) block so posts already shown by another Query Loop on the same page are not displayed again.
This is automatic deduplication for the block editor: when you place several Query Loops on one page (for example a featured list above a recent-posts list), each enabled loop skips the posts already rendered above it, keeping every post unique on the page.
How it works
query_loop_block_query_vars and render_block.silvaitamar-duplicate-post-exclusion-query-loop folder to /wp-content/plugins/.Edit each Query Loop block and enable Make posts unique on page in the block sidebar. On the front end, every enabled loop excludes the posts already shown by the loops above it, so each post appears only once on the page.
No. The plugin extends the native core/query block only.
No. The plugin adds no extra database queries. It only adjusts the post__not_in argument of the queries your Query Loops already run, using a per-request in-memory registry.
No. Cross-loop exclusion runs on the front end only. The editor preview uses the REST API and does not simulate exclusion between multiple loops on the same page.
No. Only loops with Make posts unique on page enabled register and exclude posts.
Yes. Variations register on the native core/query block. This plugin extends the same block and uses official render hooks, so it works alongside extensions like Advanced Query Loop.
Partially. A Query Loop set to inherit the template query renders from the global query and does not pass through the query_loop_block_query_vars filter. Such an inherited loop still registers the posts it shows, so a later custom loop will exclude them. However, exclusion is not applied to the inherited loop itself (it will not hide posts shown by an earlier loop). Full support for inherited queries is planned for a future release.
uniqueOnPage attribute, front-end exclusion, and rendered post registry.