outstand/query-loop-dedup

Maintainers

Package info

github.com/pixelalbatross/outstand-query-loop-dedup

Type:wordpress-plugin

pkg:composer/outstand/query-loop-dedup

Transparency log

Fund package maintenance!

s3rgiosan

Ko Fi

Statistics

Installs: 71

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.2.0 2026-07-10 13:46 UTC

This package is auto-updated.

Last update: 2026-07-10 13:50:22 UTC


README

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.

Outstand Query Loop Dedup

Features

See docs/deduplication.md for the full feature guide.

Installation

Manual Installation

  1. Download the latest release ZIP from the Releases page.
  2. Go to Plugins > Add New > Upload Plugin in your WordPress admin area.
  3. Upload the ZIP file and click Install Now.
  4. Activate the plugin.

Install with Composer

To include this plugin as a dependency in your Composer-managed WordPress project:

  1. Add the plugin to your project using the following command:
composer require outstand/query-loop-dedup
  1. Run composer install.
  2. Activate the plugin from your WordPress admin area or using WP-CLI.

Quick start

  1. Add multiple Query Loop blocks to a page.
  2. Enable Exclude duplicate posts in the block sidebar under the Deduplication panel.
  3. Each subsequent block will skip posts already shown by previous blocks.

Notes

Deduplication runs at render time. For inherited queries, pagination counts (found_posts, max_num_pages) are recomputed after filtering, but only for duplicates known at render time — posts removed on later pages are not yet known when an earlier page renders. This is an inherent limitation of render-time deduplication.

Requirements

  • WordPress 6.7 or higher
  • PHP 8.2 or higher

Tests

JS tests run locally via Jest:

npm run test:js

PHP tests run inside a wp-env container:

npm run test:setup   # first time only — starts Docker WP + test DB
npm run test:unit

Changelog

All notable changes to this project are documented in CHANGELOG.md.

License

This project is licensed under the GPL-3.0-or-later.