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
| Place | How to get it |
|---|---|
| The events page | Show events search? in Events then Settings then Pages then Event List/Archives. Yes by default. |
| The locations page | Show 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 shortcode | Add 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:
| Part | What it does |
|---|---|
| Search | Finds 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. |
| Dates | Opens a date picker to choose one day or a range. |
| Filter button | Opens the advanced search with the rest of the filters. |
| Sort button | Flips the results between ascending and descending order. |
| View button | Switches between the views you allow. It is hidden when only one view is allowed. |
| Search button | Runs the search. |
Set up the search form
All of the settings are in one section.
-
Go to Events then Settings then Formatting and open the Search Form section.
-
Under Main Search Fields, decide which of the three fields the bar shows, and what each is labeled.
-
Under Views, tick the views visitors may switch between.
-
Under Advanced Search Fields, switch the extra filters on or off one by one.
-
Click Save Changes, then look at your events page.
The Search Form section in the Formatting settings.
Main search fields
| Setting | Default | What it does |
|---|---|---|
| Show main search bar? | Yes | No removes the bar. The advanced fields are then shown in place, in Inline mode, so leave at least one of them switched on. |
| Responsive Behaviour | Multi Line on a new site | What 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 site | Shows the sort button. |
Each of the three fields has the same small group of options, under Search, Geolocation Search and Dates:
| Setting | What it does |
|---|---|
| Show text search?, Show geolocation search?, Show date range? | Shows or hides the field. All three are on by default. |
| Label | The 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 unit | Geolocation only. How far around the chosen place to search: 25 mi by default. |
| Date Separator, Date Picker Format | Dates 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.
| View | Shows |
|---|---|
| List | One event per row. |
| Grouped Lists | The list under date headings, monthly by default. |
| Grid | Cards in columns. |
| Map | A map with a marker per location. Needs Google Maps. |
| Calendar | A 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.
Advanced search
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:
| Setting | Default | What it does |
|---|---|---|
| Enable advanced fields? | Yes | No removes the advanced search and the filter button. |
| Search button text | Search | The text of the search buttons. |
| Advanced search style | Headings on a new site | Headings shows every group of filters under a fixed heading. Accordion shows collapsible groups. |
| Advanced search mode | Modal | Modal opens the filters in a popup. Inline opens them under the search bar. |
| Hidden by default? | Yes | Inline mode only. No shows the filters as soon as the page loads. |
| Show hide/show trigger? | Yes | Inline mode only. Whether visitors get a button to hide and show the filters. |
| Show label, Hide label | Show Advanced Search, Hide Advanced Search | The tooltip of the filter button. |
Filters
Each filter has a Show ...? switch and a Label.
| Filter | Default | Notes |
|---|---|---|
| Search (text) | On | The same keyword field as in the bar, repeated so it is there when the bar hides it. |
| Dates | On | The same date range, with its own separator and format. |
| Category | On | A 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. |
| Tags | On for a new site | Works like categories, with Include Tags and Exclude Tags. |
| Geolocation Search | On | The 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). |
| Country | On | A country menu. Default Country selects one to start with. |
| Region | On | A region menu. |
| State/County | On | A state menu. |
| City/Town | Off | A town menu. |
| Virtual Events | Off | See 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.5Show 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.