WP Manifestindependent plugin directory
manifest / editor / query-loop-date-query

Query Loop Date Query

Publish-date range controls for WordPress Query Loop blocks.

★ 0stars
2composer installs

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/horttcore/query-loop-date-query/archive/refs/heads/main.zip

On Packagist as ralfhortt/query-loop-date-query:

composer require ralfhortt/query-loop-date-query
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Adds publish-date range controls to Query Loop (core/query) blocks in the block editor and applies the same filters on the frontend and in the editor preview (REST).

Features

  • Quick ranges: last 30 days, last 3 months, last 12 months, this year (site timezone).
  • Custom inclusive publish-date from / until fields.
  • Skips inherited template queries (query.inherit).
  • REST collection params for accurate editor previews (published_after, published_before, published_date_range).

Requirements

  • WordPress 6.1+
  • PHP 8.1+

Development

npm install
npm run build

Query attributes

Stored on attributes.query:

  • publishedDateRange
  • publishedAfter
  • publishedBefore

REST preview also uses snake_case keys (published_date_range, published_after, published_before) synced by the editor script.

Filter

  • query_loop_date_query_range — adjust resolved { after, before } bounds (Y-m-d) before applying date_query.

License

GPL-2.0-or-later

Translations

German (de_DE): languages/query-loop-date-query-de_DE.po. After changing JS strings, run npm run build, then:

msgfmt -o languages/query-loop-date-query-de_DE.mo languages/query-loop-date-query-de_DE.po
wp i18n make-json languages --no-purge