Skip to main content

Search Parameters

Wherever Events Manager lists events, locations, calendars or bookings, the same set of parameters decides what is listed. You can pass them as shortcode attributes, as arguments to a template tag, or to the PHP functions behind both.

[events_list scope="month" category="music" limit="5"]
echo EM_Events::output( array( 'scope' => 'month', 'category' => 'music', 'limit' => 5 ) );

Both list up to five events in the Music category during the current month. A parameter that a shortcode or function doesn't use is ignored: [event] accepts format, for example, but has no use for page.

Data types​

The Type column uses PHP type names.

TypeMeaning
intA whole number.
boolYes or no, written 1 or 0.
stringText, such as "future".
mixed[]One value or several. In a shortcode, separate them with commas: "1,music,34". In PHP you can also pass an array.
int[], string[]The same, for numbers only or text only.

In the Default column, settings means the default comes from Events then Settings.

Parameters​

General parameters​

These apply to events and locations alike.

ParameterTypeDefaultDescription
limit int0The most items to show. 0 means no limit. Shortcodes and widgets set their own default, usually from the settings.
offset int0Skips this many items from the start of the results. Needs a limit above 0.
pagination bool0Set to 1 to show page links under the list when there are more items than limit.
page int1Which page of results to show. Overrides offset.
page_queryvar stringpnoThe name of the URL parameter that carries the page number. Give each list its own name when two paginated lists share a page.
order stringASCASC for ascending or DESC for descending. For events the default comes from the settings.
orderby string[]settingsThe fields to sort by, such as event_start_date,event_name or location_town. Locations default to location_name.
groupby stringnoneShows one item for each distinct value of a field. See Grouping and ordering.
groupby_orderby string[]start date and timeWhich item of each group is shown, when groupby is set.
groupby_order stringASCThe direction of groupby_orderby.
search stringFinds items containing this text. For events it looks in the event name and description and in the location's name and address.
status mixed1The publish status: 1 or publish for published, 0 or pending for pending review, draft, trash, all (everything but trash) or everything. Visitors who can't edit other people's events only ever see published items, plus their own if they are logged in.
owner int[]0Only items owned by these user IDs. me means the logged-in user.
private booluser1 includes and 0 excludes private items. By default they are included for people allowed to read them.
private_only bool01 shows private items only.
post_id int[]Only the items with these WordPress post IDs.
blog int[]current siteOn multisite in Global Tables Mode, the site ID or IDs to take items from.
group stringWith BuddyPress groups active, only the events of a group: a group ID, my for every group the logged-in member belongs to, or this for the group whose page is being viewed.
language stringcurrentOnly items in this language. For multilingual sites using a supported plugin such as WPML.
no_results_msg stringsettingsThe text to show when nothing matches.
array bool0PHP only. Returns arrays of data in place of objects.

Display parameters​

These change how the matched items are shown, not which items match.

ParameterTypeDefaultDescription
view stringlistFor events: list, list-grouped (split under headings by day, week, month or year, see mode), grid, map or calendar. For locations: list, grid or map.
views string[]settingsThe views a visitor can switch between when a search form is shown, such as list,grid,map. See the search form parameters.
has_search bool01 shows a search form with the results. Accepts the search form parameters. Calendars treat this differently, see calendar parameters.

Format parameters​

These set the HTML and placeholders used to print each item. Without them, the formats from Events then Settings then Formatting are used.

ParameterTypeDefaultDescription
format stringsettingsThe format for each item. When you give a format, the header and footer are empty unless you give those too.
format_header stringsettingsHTML printed once before the list.
format_footer stringsettingsHTML printed once after the list.
Not in shortcode attributes

For security, shortcodes don't accept format, format_header or format_footer as attributes unless you allow it in the settings. In a shortcode, put the item format between the opening and closing tags, and the header and footer HTML before and after the shortcode. See Shortcode Security. PHP calls are not affected.

<ul>
[events_list scope="future"]<li>#_EVENTLINK, #_EVENTDATES</li>[/events_list]
</ul>

Event parameters​

For everything that lists events, such as [events_list], em_events() and EM_Events::get(). The location parameters also work here, to filter events by where they are held.

ParameterTypeDefaultDescription
scope stringsettingsThe dates to show events for. The default is Default List Scope in Events then Settings then General then General Options, which starts as future. See Scope values below.
event int[]0Only the events with these event IDs.
category mixed[]0Category IDs or slugs. Separate with commas for events in any of them, or with & for events in all of them. Put a minus sign in front to exclude: -jazz,-rock shows everything except jazz and rock.
tag mixed[]0Tag IDs or slugs, with the same rules as category.
bookings mixed1 for events with bookings enabled, 0 for events without. user shows the events the logged-in visitor has booked.
active bool1 shows only events with the Active status, 0 leaves them out. Needs Enable Event Status? in the settings, as do the next two.
cancelled boolsettings1 shows only cancelled events, 0 leaves them out. Left unset, it follows Include cancelled events? in Events then Settings then Pages. See Cancel an Event.
active_status int[]For custom event statuses: status numbers to show. 1 is Active. 0 leaves out cancelled events.
event_archetype string[]currentWhich archetypes to include, by post type name, separated by commas. The default is the archetype of the page being viewed.
event_type string[]Which kinds of event to include: single, recurrence (one date of a recurring event), recurring or repeating, separated by commas.
recurrences bool1 shows only dates of recurring events, 0 shows only one-off events. Unset shows both.
recurrence int0Only the dates of the recurring event with this event ID.
recurrence_set int[]Only the dates that come from this recurrence set (one of the repeat rules of a recurring event), by its ID.
recurring bool1 lists the recurring and repeating events themselves, not their dates. For custom code.
timeslots bool01 lists each timeslot of an event as its own item. Calendars take their default from Split by timeslots? in the settings.
has_location bool01 shows only events with a physical location.
no_location bool01 shows only events without a physical location.
has_event_location bool1 shows only events with an online location (a URL, a Zoom meeting and so on), 0 only events without.
event_location_type string[]Only events whose online location is of this type, such as url, custom_link or zoom_meeting.
access string[]Since 7.5 How people can attend: in_person for events with a venue, online for events with an online location, hybrid for events with both. Separate several with commas to match any. A hybrid event matches all three. See Hybrid and Virtual Events.
featured boolPro 1 shows only featured events, 0 leaves them out. See Pay to Post.
location_status mixedOnly events whose location has this publish status.
month intOnly events in this month, 1 to 12.
year intOnly events in this year, such as 2027.
timezone string[]Only events held in these timezones, such as Europe/London or Europe/London,Europe/Madrid.
timezone_scope stringA timezone name, such as Europe/Madrid. The dates in scope are then read in that timezone and compared with each event's real start time, so "today" means today in Madrid wherever the event is held. Without it, scope compares against each event's own local date.
mode stringsettingsFor grouped lists: daily, weekly, monthly or yearly.
date_format stringsettingsFor grouped lists: the date in each group heading, in PHP date format.
header_format string<h2>#s</h2>For grouped lists: the HTML of each group heading, where #s is replaced by the date.

Scope values​

ValueEvents shown
futureUpcoming events, and events that have started but not ended.
pastEvents that have ended.
allEvery event.
today, tomorrowEvents on that day.
weekEvents in the current week, from its first day (as set in WordPress) to its last.
this-weekEvents from today to the end of the week.
monthEvents in the current calendar month.
this-monthEvents from today to the end of the month.
next-monthEvents in the next calendar month.
1-months, 2-months, 3-months, 6-months, 12-monthsEvents from today until the end of the month that many months ahead. Any number works.
2027-03-14Events on one date, written yyyy-mm-dd.
2027-03-01,2027-03-31Events between two dates.

Events that started before the period and are still running are included too. To treat an event as past from the moment it starts, set Are current events past events? to Yes in Events then Settings then Pages.

Location parameters​

For everything that lists locations, such as [locations_list], em_locations() and EM_Locations::get(). For locations, scope defaults to all and only matters together with eventful or eventless.

The place parameters country, region, state, town and postcode match whole values only, accept several values separated by commas, and accept a minus sign in front of a value to exclude it.

ParameterTypeDefaultDescription
location int[]0Only the locations with these location IDs. In an events list, only events at these locations.
country string[]Two-letter country codes such as US,DE. -DE,-GB shows everywhere except Germany and the United Kingdom.
region string[]Locations in these regions.
state string[]Locations in these states or counties.
town string[]Locations in these towns or cities.
postcode string[]Locations with these postcodes.
near float[]A latitude and longitude, written 51.5072,-0.1276. Shows locations within near_distance of that point.
near_distance intsettingsThe radius for near.
near_unit stringsettingsmi or km.
eventful bool01 shows only locations that have events within scope.
eventless bool01 shows only locations with no events within scope. eventful wins if both are set.
event_status mixedOnly locations with events of this publish status.

Category and tag parameters​

[categories_list], [tags_list], EM_Categories::get() and EM_Tags::get() accept the general parameters for lists, plus the arguments of the WordPress get_terms() function.

Calendar parameters​

For [events_calendar], em_calendar() and EM_Calendar::output(). Calendars also accept the general, event and location parameters to choose which events appear. Several defaults come from Events then Settings then Formatting then Calendar.

ParameterTypeDefaultDescription
calendar_size stringsettingslarge, medium or small for a fixed size. Without it the calendar adapts to the space it has.
calendar_event_style stringsettingsHow events appear on a day: pill (a labeled bar per event), dot (one dot under the date), dots (a dot per event up to limit, then a +) or ring (a ring around the date).
calendar_dates_height stringaspectHow tall the rows of dates are. aspect keeps cells as tall as they are wide and grows a row when its content needs it, even makes every row as tall as the tallest, auto sizes each row to its own content.
calendar_preview_mode stringsettingsWhat happens when a visitor clicks an event: modal, tooltips or none.
calendar_preview_mode_date stringsettingsWhat happens when a visitor clicks a date: modal lists that day's events in a popup, none goes to the page for that date.
calendar_nav bool1Shows the navigation in the calendar header: the month picker, previous and next links, and the today link.
calendar_month_nav bool1Shows the month picker. Needs calendar_nav.
calendar_nav_nofollow bool01 adds rel="nofollow" to the navigation links, to keep search engines from crawling month after month.
calendar_header stringnormalcentered puts the month name in the middle of the header with the navigation either side.
empty_months bool10 makes the navigation skip months that have no events.
calendar_timezone stringA timezone name, such as America/New_York. The calendar then places events on days, and shows times, in that timezone instead of each event's own.
has_search bool01 adds a search button to the calendar that opens the search form in a popup.
show_search bool0With has_search, 1 shows the search form above the calendar. Accepts the search form parameters.
limit intsettingsFor calendars, the most events to show on each day, not in total.
long_events boolsettings1 shows an event that spans several days on every day it runs.
month intcurrentThe month to open on.
year intcurrentThe year to open on.
scope stringallFor calendars, a pair of dates or future. With future, the calendar opens on the current month and leaves out events before today.
number_of_weeks intautoThe number of week rows. By default as many as the month needs, usually five or six.
timeslots boolsettings1 shows each timeslot of an event as its own entry.
full boolAn older way to ask for a large calendar. It no longer sets the size, so use calendar_size="large".

Booking parameters​

For PHP code that fetches bookings with EM_Bookings::get(). No shortcode takes these.

ParameterTypeDefaultDescription
status int[]Booking status numbers: 0 Pending, 1 Approved, 2 Rejected, 3 Cancelled, 4 Awaiting Online Payment, 5 Awaiting Payment. Pro adds 6 for waitlist reservations.
rsvp_status intThe attendee's reply: 0 not attending, 1 attending, 2 maybe.
person intOnly bookings made by the user with this ID.
owner intuserOnly bookings for events owned by this user. For someone who can't manage other people's bookings it defaults to themselves.
event int[]Only bookings for these events.
ticket_id intOnly bookings that include this ticket.
booking_id int[]Only the bookings with these IDs.
array mixed01 returns arrays of data in place of objects. A list of column names returns only those columns.
caution

Bookings hold personal data. Check what the current user is allowed to see before printing anything fetched this way.

Examples​

A paged list of tomorrow's events, ten per page:

[events_list scope="tomorrow" limit="10" pagination="1"]
echo EM_Events::output( array( 'scope' => 'tomorrow', 'limit' => 10, 'pagination' => 1 ) );

Locations in the United States with events tomorrow:

[locations_list scope="tomorrow" eventful="1" country="US" limit="10" pagination="1"]
echo EM_Locations::output( array( 'scope' => 'tomorrow', 'eventful' => 1, 'country' => 'US', 'limit' => 10, 'pagination' => 1 ) );

Online and hybrid events in the next three months, leaving out cancelled ones:

[events_list scope="3-months" access="online" cancelled="0"]

A small calendar of one category, showing a dot on days with events:

[events_calendar category="music" calendar_size="small" calendar_event_style="dot"]