Skip to content

Day of Week & Month Filters

Voxel Toolkit adds two search filter types to every post type: Day of Week (VT) and Month (VT). They filter posts by when they happen — sourced from recurring-date fields, plain date fields, or the publish date — replacing category-per-month workarounds with real date data.

Overview

"Which restaurants have live music on Fridays?" and "Which events run in June?" are the same question at two granularities. Both filters index actual dates: a recurring event is expanded through its full recurrence, a multi-day festival marks every day and month it spans, and the answer comes from a single indexed column with no joins.

Key Features

  • Available on any post type, always — no function toggle required
  • Data sources: recurring-date fields, date fields, or the publish date
  • Single or multiple selection with ANY/ALL matching
  • Optional adaptive counts that update after each search and hide empty options
  • URL parameters for shareable filtered searches
  • Automatic reindexing on save, including when the data source changes

Adding a Filter

  1. Go to Voxel → Post Types → (your post type) → Search & Filters (the Filters tab)
  2. Add a filter and choose Day of Week (VT) or Month (VT)
  3. Set the label, key, and icon as with any Voxel filter
  4. Configure the settings below and save — the search index updates automatically

Then add the filter to your Search Form (VX) widget like any other. In the widget it offers Display as Popup, Inline, or Buttons, and a Default value as a comma-delimited slug list. In Popup mode there's also a Popup min width control (default 300px) — raise it if your theme's larger buttons crowd the popup footer.

Filter Settings

SettingOptionsNotes
Data sourceRecurring date fields / Date fields / Date publishedWhich dates the filter reads
Allow selection of multiple days/months?On (default) / OffOff gives a single-choice filter
Match behaviorMatch posts on ANY of the selected days/months (default) / Match posts on ALLOnly shown when multiple selection is on
Week starts onMonday (default) / SundayDay of Week only — display order of the list
Enable adaptive display?Off (default)Updates post counts after each search and hides days/months with zero results

Weekday and month labels are localised automatically; a term the visitor has already selected is never hidden by adaptive display, so it can always be unselected.

URL Parameters

The parameter name is the filter's key; the value is a comma-delimited list of fixed English slugs:

?day_of_week=monday,friday
?months=january,june

Slugs are sunday through saturday and january through december. Unknown slugs are ignored, and a single-select filter keeps only the first.

How Indexing Works

  • Recurring-date fields — every entry's start-to-end span is marked, then the recurrence is walked (daily/weekly/monthly/yearly) until its end date. "Every Tuesday until December" indexes Tuesday; a yearly event indexes its month every year. A span of 6+ days marks every weekday; 365+ days marks every month
  • Date fields and publish date — the single date's weekday/month is indexed
  • Each filter stores a compact bitmask column in the post type's index table, so queries are a single comparison — ANY matches any shared bit, ALL requires every selected bit

Reindexing

Adding or removing one of these filters changes the index table, and Voxel reindexes as part of saving the post type. Re-pointing an existing filter at a different data source doesn't change the table shape, so the toolkit watches for that too and flags the index for rebuilding automatically — you never need to reindex by hand.

Pairs with Weekday Recurrences

The Weekday Recurrences function lets owners enter "every 3rd Saturday" style schedules, which these filters then index and match correctly.

Troubleshooting

A Post Isn't Matching the Expected Day or Month

  • Check which data source the filter uses — a recurring-date filter ignores plain date fields and vice versa
  • For recurring dates, confirm the recurrence's end date covers the period you expect

Counts Aren't Updating

  • Adaptive display is off by default — enable Enable adaptive display? on the filter

Requirements

  • Voxel Theme (active and configured)
  • Voxel Toolkit plugin (the filters are always available; no function toggle)
  • A date, recurring-date, or publish-date source on the post type

Built by Code Wattz.