
內容簡介
Duplicate Post Exclusion for Query Loop Block 外掛為 WordPress 的原生 Query Loop 區塊新增了一個切換選項,能夠自動排除已在同一頁面顯示的文章,確保每篇文章在頁面上唯一,提升使用者體驗。
【主要功能】
• 自動排除重複文章
• 支援多個 Query Loop 區塊
• 無需自訂區塊或變體
• 使用官方鉤子進行調整
• 兼容進階查詢變體
外掛標籤
開發者團隊
② 後台搜尋「Duplicate Post Exclusion for Query Loop Block」→ 直接安裝(推薦)
原文外掛簡介
Duplicate Post Exclusion for Query Loop Block 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.
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
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_vars and render_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
