The Event Query Loop block

The Event Query Loop is the display block with filters. You decide which events it selects and how much of each one it shows, and it renders the result on the server. Four panels in the block sidebar hold everything.

Query

  • Date range: Upcoming (from now on), Past (up to now), This month, Next month, This year (1 January to 31 December of the current year) or All time. Months and years are worked out in your site timezone.
  • Order: Ascending (oldest first) or Descending (newest first). Ascending is the default and is what an upcoming list wants. Switch to descending for a past-events archive, so the most recent one comes first.
  • Number of events: from 1 to 50. The default is 10.

Filters

Leave a filter empty and it places no restriction. Fill it and the selection narrows.

  • Categories: start typing and pick from your existing event categories. You can add several.
  • Tags: the same, with your event tags.
  • Venue: one venue, or Any.
  • Organizer: one organizer, or Any.

Several terms inside one field widen the selection: an event matching any of the chosen categories is kept. Filling two different fields narrows it: an event with both categories and tags set has to match on both. Same for a venue and an organizer together.

If your combination matches no event, the block prints No events match this query. That is usually a sign that the filters contradict each other. The categories and tags guide covers how to organise terms so this happens less often.

Layout

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

Display

Six toggles decide what each entry carries:

  • Featured image: on by default.
  • Date and time: on by default.
  • Venue: on by default.
  • Organizer: off by default.
  • Categories: off by default. Prints the event’s categories as links.
  • Excerpt: off by default.

A toggle only produces something when the event has the data: no featured image, no venue, no organizer, no excerpt means no line. The Compact layout is deliberately terse, so it puts the date on its own line above the title and ignores the excerpt and category toggles.

What it selects

  • Published events only.
  • One entry per date inside the range, so a recurring event appears once for each of its dates rather than once in total.
  • Dates and times in your site’s formats.

Two patterns worth knowing

A past-events archive: set Date range to Past and Order to descending. A single venue’s programme: leave the date range on Upcoming and pick that venue. Neither is possible with the simpler listing blocks, which is the main reason to use this one.

Filtering your visitors can change

Everything above is set by you, in the editor, once. Your visitors see the result and cannot alter it. Front-end controls, where a visitor picks a category or a date and the list updates, come from the Filter Bar in HappenBoard Pro, which drives this block.

What’s next