Search by

ralfhortt / query-loop-date-query

Ralf Hortt

Publish-date range controls for WordPress Query Loop blocks.

Package info

github.com/Horttcore/query-loop-date-query

Type:wordpress-plugin

pkg:composer/ralfhortt/query-loop-date-query

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-11-05 09:39 UTC

This package is auto-updated.

Last update: 2026-11-05 09:55:41 UTC


README

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