Skip to main content

Event Search Form

The search form is the bar above a list of events. Visitors type a keyword, pick dates or a place, open more filters, and the list underneath updates without the page reloading. The same bar lets them re-sort the results and switch between list, grid, map and calendar views.

The search bar on the events page.

It is on by default on your events page. This page explains where else it can go, and how to choose its fields in the settings.

Where the search form appears​

PlaceHow to get it
The events pageShow events search? in Events then Settings then Pages then Event List/Archives. Yes by default.
The locations pageShow locations search? in Events then Settings then Pages then Location List/Archives. This form searches locations, and has the keyword, place and address fields only.
Above any list you add with a shortcodeAdd has_search="1": [events_list has_search="1"] or [locations_list has_search="1"].
On a calendar[events_calendar has_search="1"] adds a filter button to the calendar header, which opens the filters in a popup.
On its own, anywhere[event_search_form] or [location_search_form]. Results open on your events or locations page.

The Events Manager blocks and widgets don't include a search form. To place one in the block editor, put one of the shortcodes above in a Shortcode block.

[events_list has_search="1" views="list,grid,calendar" limit="12"]

A shortcode can override almost every setting described below for that one form, using the search form parameters. For example, search_geo="0" hides the place field on one page.

What visitors see​

The main bar holds up to three fields, followed by a row of buttons:

PartWhat it does
SearchFinds events by words in their name or description, or in the name and address of their location.
Near...Finds events near a place the visitor types. Needs Google Maps to be set up.
DatesOpens a date picker to choose one day or a range.
Filter buttonOpens the advanced search with the rest of the filters.
Sort buttonFlips the results between ascending and descending order.
View buttonSwitches between the views you allow. It is hidden when only one view is allowed.
Search buttonRuns the search.

Set up the search form​

All of the settings are in one section.

  1. Go to Events then Settings then Formatting and open the Search Form section.

  2. Under Main Search Fields, decide which of the three fields the bar shows, and what each is labeled.

  3. Under Views, tick the views visitors may switch between.

  4. Under Advanced Search Fields, switch the extra filters on or off one by one.

  5. Click Save Changes, then look at your events page.

The Search Form section in the Formatting settings.

Main search fields​

SettingDefaultWhat it does
Show main search bar?YesNo removes the bar. The advanced fields are then shown in place, in Inline mode, so leave at least one of them switched on.
Responsive BehaviourMulti Line on a new siteWhat the bar does when it is narrower than 850 pixels: One Line squeezes the fields onto one row, Multi Line lets them wrap onto several rows.
Show sorting icon?Yes on a new siteShows the sort button.

Each of the three fields has the same small group of options, under Search, Geolocation Search and Dates:

SettingWhat it does
Show text search?, Show geolocation search?, Show date range?Shows or hides the field. All three are on by default.
LabelThe text inside the empty field: "Search", "Near..." and "Dates" by default.
Hide on small screen size?, Hide on medium screen size?Drops the field from the bar when the form is narrower than 650 or 850 pixels, to save room on phones. The field stays available in the advanced search if it is switched on there.
Default distance, Default distance unitGeolocation only. How far around the chosen place to search: 25 mi by default.
Date Separator, Date Picker FormatDates only. The word between two chosen dates ("and"), and how a chosen date is written in the field (M j, which gives "Nov 27").

Views​

Under Views, View Types lists the ways results can be shown. Tick the ones visitors may choose from.

ViewShows
ListOne event per row.
Grouped ListsThe list under date headings, monthly by default.
GridCards in columns.
MapA map with a marker per location. Needs Google Maps.
CalendarA month calendar.

All five are ticked on a new site. If you tick only one, the view button disappears.

The view the page opens with is a separate setting: Default View, at the top of Events then Settings then Formatting then Events. A shortcode can set both for one list, with view="grid" and views="list,grid".

A locations search offers List, Grid and Map only.

The advanced search holds the filters that don't fit in the bar. Visitors open it with the filter button.

The advanced search popup, with the virtual events filter switched on.

These settings, under Advanced Search Fields, control how it opens:

SettingDefaultWhat it does
Enable advanced fields?YesNo removes the advanced search and the filter button.
Search button textSearchThe text of the search buttons.
Advanced search styleHeadings on a new siteHeadings shows every group of filters under a fixed heading. Accordion shows collapsible groups.
Advanced search modeModalModal opens the filters in a popup. Inline opens them under the search bar.
Hidden by default?YesInline mode only. No shows the filters as soon as the page loads.
Show hide/show trigger?YesInline mode only. Whether visitors get a button to hide and show the filters.
Show label, Hide labelShow Advanced Search, Hide Advanced SearchThe tooltip of the filter button.

Filters​

Each filter has a Show ...? switch and a Label.

FilterDefaultNotes
Search (text)OnThe same keyword field as in the bar, repeated so it is there when the bar hides it.
DatesOnThe same date range, with its own separator and format.
CategoryOnA list of categories with a filter box above it. Include Categories limits the list to the IDs you give, and Exclude Categories removes IDs from it. If both are filled in, the exclusions are ignored.
TagsOn for a new siteWorks like categories, with Include Tags and Exclude Tags.
Geolocation SearchOnThe place field again, plus Show distance options?, which lets visitors pick how far to search. Distance Values sets the choices (5,10,25,50,100 by default).
CountryOnA country menu. Default Country selects one to start with.
RegionOnA region menu.
State/CountyOnA state menu.
City/TownOffA town menu.
Virtual EventsOffSee below.

Category and tag filters appear only while categories and tags are enabled for events.

The Region, State/County and City/Town menus stay hidden until the visitor chooses a country, and the distance options stay hidden until they choose a place in Near.... That is why the popup above shows only the country menu under Location Options.

Online events filter​

Since 7.5

Show virtual events filter? adds a checkbox to the location options, labeled "Virtual events only" unless you change its Label. When a visitor ticks it, the results are limited to events they can join online. That includes hybrid events, which can be attended in person as well.

The checkbox appears only when both of these are true:

  • Enable locations? is Yes.
  • Virtual Locations is ticked under Location Types.

Both are in Events then Settings then General then General Options, under Location Settings. See Location types.

The switch for the online events filter.

To apply the same filter in a shortcode without showing the checkbox, use the access attribute: [events_list access="online"] lists online and hybrid events, and [events_list access="in_person"] lists events with a physical location.

Limits​

  • The search form filters the list it sits above. A standalone [event_search_form] sends visitors to your events page, so that page must exist: choose it for Events page in Events then Settings then Pages then Event List/Archives.
  • When the events page is set to show a calendar (Display calendar in events page?), it shows the calendar alone, without the search bar.
  • A list that uses its own format written inside the shortcode reloads the page to show results and page links, where other lists update in place.

Troubleshooting​

The search bar is missing from the events page​

Check Show events search? in Events then Settings then Pages then Event List/Archives, and Show main search bar? in the Search Form section. If both are Yes, check that at least one of the three main fields is switched on.

The filter button is missing​

The advanced search hides itself when it has nothing to show. Set Enable advanced fields? to Yes and switch on at least one of the category, tag, country, region, state, town or virtual events filters.

The "Near..." field finds nothing​

It needs Google Maps, with a working API key. See Google Maps. Without it, switch the field off with Show geolocation search? in both the main and the advanced fields.

The virtual events checkbox does not appear​

Virtual Locations is not ticked under Location Types, or locations are disabled. See Online events filter.

Visitors can't switch to the map or calendar​

Tick the view under View Types. A shortcode with its own views attribute ignores that setting, so check the shortcode too.