Опис
Silvaitamar Duplicate Post Exclusion for Query Loop adds a toggle to the native core/query (Query Loop) block so posts already shown by another Query Loop on the same page are not displayed again.
How it works
- Edit a Query Loop block in the block editor.
- In the sidebar, enable Make posts unique on page.
- Enable the same option on any other Query Loops that should respect prior results.
- On the front end, each enabled loop excludes post IDs already rendered by previous enabled loops.
Features
- Extends the core Query Loop block — no custom block or variation required.
- Uses official hooks:
query_loop_block_query_varsandrender_block. - No extra database queries; only adjusts existing query arguments.
- Per-request in-memory registry (no transients or options).
- Compatible with Query Loop variations such as Advanced Query Loop.
Requirements
- WordPress 6.7 or later
- PHP 7.4 or later
Встановлення
- Upload the
silvaitamar-duplicate-post-exclusion-query-loopfolder to/wp-content/plugins/. - Activate the plugin through the Plugins screen in WordPress.
- Edit a Query Loop block and enable Make posts unique on page in the block sidebar.
Часті питання
-
Do I need a separate block?
-
No. The plugin extends the native
core/queryblock only. -
Does this affect the editor preview?
-
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.
-
Do Query Loops without the option participate?
-
No. Only loops with Make posts unique on page enabled register and exclude posts.
-
Does this work with Advanced Query Loop or other Query Loop variations?
-
Yes. Variations register on the native
core/queryblock. This plugin extends the same block and uses official render hooks, so it works alongside extensions like Advanced Query Loop. -
Does it work with “Inherit query from template”?
-
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_varsfilter. 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.
Відгуки
Для цього плагіна немає відгуків.
Учасники та розробники
“Silvaitamar Duplicate Post Exclusion for Query Loop” — проект з відкритим вихідним кодом. В розвиток плагіну внесли свій вклад наступні учасники:
Учасники“Silvaitamar Duplicate Post Exclusion for Query Loop” було перекладено на 1 локалізацію. Дякуємо перекладачам за їх роботу.
Перекладіть “Silvaitamar Duplicate Post Exclusion for Query Loop” на вашу мову.
Цікавитесь розробкою?
Перегляньте код, перегляньте сховище SVN або підпишіться на журнал розробки за допомогою RSS.
Журнал змін
1.0.0
- Initial release:
uniqueOnPageattribute, front-end exclusion, and rendered post registry.

