The Event Query Loop block

Available in:Free

The Event Query Loop block shows a list or grid of events that you select by date range, category, tag, venue or organizer. Use it for a past events page, this week’s programme or the events of one venue.

It works on any page, post or template. You set it up in the block settings sidebar, in four panels: Query, Filters, Layout and Display.

Add the block

  1. Edit the page, post or template where the list should appear.
  2. Open the block inserter and add Event Query Loop from the HappenBoard category.
  3. Work through the four panels below. The preview in the editor updates as you go.
  4. Save.

Choose the dates (Query panel)

SettingWhat it doesDefault
Date rangeWhich dates to list. See the choices below.Upcoming
OrderAutomatic, Ascending (oldest first) or Descending (newest first).Automatic
Number of eventsHow many dates to show, from 1 to 50.10

The Date range choices:

  • Upcoming: from now on, events under way included.
  • Past: dates that started before now.
  • Today: today, from midnight to midnight, events already over included.
  • This week: the current week, starting on the day set in Settings → General.
  • This month and Next month: from the first to the last day of the month.
  • This year: 1 January to 31 December of the current year.
  • All time: every date, past and future.
  • Custom range: two dates you pick in From and To, both days included. Leave From empty to start from now, or To empty for no end.

Every range follows your site’s time zone. With Order on Automatic, the soonest date comes first, except for Past, where the most recent comes first. That is what a past events page needs.

Narrow the selection (Filters panel)

  • Categories: type and pick one or more event categories. Events in their sub-categories count too.
  • Tags: the same, with event tags.
  • Venue: one of your saved venues, or the first choice, Any.
  • Organizer: one of your saved organizers, or Any.

An empty filter does not restrict anything. Several categories in one field widen the choice: an event in any of them is kept. Filters in different fields add up: an event must match the categories and the tags, the venue and the organizer.

The Venue filter only finds events linked to one of your saved venues. A venue typed in the Venue name field of an event does not count.

Choose the layout (Layout panel)

  • Layout: List, Grid or Compact.
  • Columns: from 1 to 4, shown for the Grid layout. The default is 3.

Compact gives one short entry per event: the date without the time, then the title. It never shows the image, the excerpt or the categories.

Choose what each event shows (Display panel)

ToggleWhat it addsDefault
Featured imageThe event’s featured imageOn
Date and timeWhen the date startsOn
VenueThe venue nameOn
OrganizerThe organizer nameOff
CategoriesThe event’s categories, as links to their pagesOff
ExcerptThe event’s excerptOff

A line only appears when the event has that information: an event without a venue gets no venue line.

What it lists

  • Published events only.
  • One entry per date: a recurring event appears once for each of its dates in the range, and each entry opens the event page on that date. A date you removed with Skip is left out.
  • A date already under way when the range begins counts: This month keeps an event that started last month and ends this month.

When nothing matches, the block says No events match this query.

If you see it, widen the date range or check that your filters do not contradict each other, such as a venue that hosts none of the chosen categories.

Search and visitor filters

The loop can also keep only the events whose title, excerpt or text contain some words. That search has no field in the block settings. It comes from the Search field of the Events Filter Bar, a HappenBoard Pro block.

With the Filter Bar on the same page, visitors change the selection themselves: category, tag, venue, organizer, search words, and a When choice (Upcoming, Today, This week, This month or Custom range). The loop updates without reloading the page.

Two common setups

  • A past events page: set Date range to Past and leave Order on Automatic.
  • One venue’s programme: leave Date range on Upcoming and pick the venue in Venue.

Next steps