Linux 软件免费装
Banner图

Silvaitamar Duplicate Post Exclusion for Query Loop

开发者 itamarsilvacc
更新时间 2026年7月7日 07:06
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

posts gutenberg duplicate block editor query loop

下载

1.0.0

详情介绍:

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
  1. Edit a Query Loop block in the block editor.
  2. In the sidebar, enable Make posts unique on page.
  3. Enable the same option on any other Query Loops that should respect prior results.
  4. On the front end, each enabled loop excludes post IDs already rendered by previous enabled loops.
Features Requirements

安装:

  1. Upload the silvaitamar-duplicate-post-exclusion-query-loop folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Edit a Query Loop block and enable Make posts unique on page in the block sidebar.

升级注意事项:

1.0.0 Initial release.

常见问题:

Do I need a separate block?

No. The plugin extends the native core/query block 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/query block. 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_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.

更新日志:

1.0.0