Prevents duplicate posts across multiple Query Loop blocks on the same page.
Opt-in per block via a toggle in the block editor. Supports custom queries, inherited queries, and arbitrary custom blocks via a resolver filter. Includes editor-side preview, PHP filters for per-block overrides, and an exclude_duplicates WP_Query arg for ad-hoc lists.
See docs/deduplication.md for the full feature guide.
- Download the latest release ZIP from the Releases page.
- Go to Plugins > Add New > Upload Plugin in your WordPress admin area.
- Upload the ZIP file and click Install Now.
- Activate the plugin.
To include this plugin as a dependency in your Composer-managed WordPress project:
- Add the plugin to your project using the following command:
composer require outstand/query-loop-dedup- Run
composer install. - Activate the plugin from your WordPress admin area or using WP-CLI.
- Add multiple Query Loop blocks to a page.
- Enable Exclude duplicate posts in the block sidebar under the Deduplication panel.
- Each subsequent block will skip posts already shown by previous blocks.
- WordPress 6.7 or higher
- PHP 8.2 or higher
JS tests run locally via Jest:
npm run test:jsPHP tests run inside a wp-env container:
npm run test:setup # first time only — starts Docker WP + test DB
npm run test:unitAll notable changes to this project are documented in CHANGELOG.md.
This project is licensed under the GPL-3.0-or-later.