Modules / Query loops & dynamic data

Query loop: date limit

Limit a query loop to recent posts, or to a date range, with fields next to the Query editor. You do not need to write a date query.

#13 of 39 modules by votes

  • On by default
  • Needs Bricks 2.4 or newer
  • Tested with Bricks 2.4.3

Tile 13 of 39, ranked by votes · Recording in progress

Where to find it in the builder

Container, Block, Div, Content tab, directly under the Query control. The fields show only while the element has a query loop.

How to use it

  1. Select a Container, Block or Div and turn on its query loop.
  2. Under the Query control, fill in one or more of these fields:
    • Only the last N days: enter 30 to keep posts from the date 30 days ago onward.
    • Only after date: a date such as 2026-01-31, or dynamic data such as {post_date}.
    • Only before date: a date such as 2026-12-31, or dynamic data.
  3. Pick the Date column: Published (the default) or Modified. The choice applies to all three fields.

Leave a field empty to skip it. Set Only after date and Only before date together to get a range. Both dates are inclusive.

How it works with your Query editor

Kiln adds your fields as one more date condition. A date query you already set in the Query editor stays in place, and a post has to pass both.

If you fill in Only the last N days and Only after date, the explicit date wins and the day count is ignored.

Limits

  • Only the date counts. If you enter a time, Kiln drops it.
  • Dates are read in your site's timezone (Settings > General). The day count starts from today's date in that timezone.
  • A date Kiln cannot read, or dynamic data that renders empty, turns that field off. The loop is not emptied.
  • Only the last N days set to 0, or left empty, is off.

Settings

None. Turn the module on in Bricks > Kiln (it is on by default).

Requirements

Bricks 2.4 or newer.