A WordPress directory date filter narrows custom post type listings by date, so visitors can find recently added entries. This demo targets the directory_listing archive and its Added field. Pick Last 30 days or set an After date to see matching listings.

Try this: Pick Last 30 days or set an After date to narrow the directory.

How this demo is configured

  • Create a filter by Added (date field post_date). Show as Date picker. Date type: Date, format Y-m-d.
Filters
Added
Added
24 listings

Restaurants · Old Town · $$$$ · 4.5★

The Glasshouse

1 Cathedral Yard

Cafés · Harbour District · $ · 4.0★

Corner Cup

9 Dock Street

Bakeries · Harbour District · $ · 4.2★

Sweet Alibi

31 Dock Street

What the directory date filter checks

The demo adds a Date filter to the directory_listing post type. Pick an After date, a Before date, a bounded interval, or Last 30 days to narrow the listing archive.

When to filter listings by date

A local directory can show recently added businesses, while an event archive can surface listings by event date. Pick the field that reflects the question shoppers have.

Add a date filter to a WordPress post type

  1. Go to Filter Sets → Add New and choose the public directory post type under Content to filter.
  2. Add a filter row. Set What are you filtering? to Date, and enter the shopper-facing name and unique URL keyword.
  3. Under How shoppers choose, select Date picker. Choose Date for Date type when filtering publication dates.
  4. Set Where should filters show? to the directory archive and test the After, Before, and preset choices.

Frequently asked questions

What does Added mean in this demo?

Added uses the directory listing publication date.

What if an event date differs from its publish date?

Map the Date filter to the field that stores the event date instead of Added.