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.
| Type | Meaning |
|---|---|
int | A whole number. |
bool | Yes or no, written 1 or 0. |
string | Text, 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | int | 0 | The most items to show. 0 means no limit. Shortcodes and widgets set their own default, usually from the settings. |
| offset | int | 0 | Skips this many items from the start of the results. Needs a limit above 0. |
| pagination | bool | 0 | Set to 1 to show page links under the list when there are more items than limit. |
| page | int | 1 | Which page of results to show. Overrides offset. |
| page_queryvar | string | pno | The name of the URL parameter that carries the page number. Give each list its own name when two paginated lists share a page. |
| order | string | ASC | ASC for ascending or DESC for descending. For events the default comes from the settings. |
| orderby | string[] | settings | The fields to sort by, such as event_start_date,event_name or location_town. Locations default to location_name. |
| groupby | string | none | Shows one item for each distinct value of a field. See Grouping and ordering. |
| groupby_orderby | string[] | start date and time | Which item of each group is shown, when groupby is set. |
| groupby_order | string | ASC | The direction of groupby_orderby. |
| search | string | Finds items containing this text. For events it looks in the event name and description and in the location's name and address. | |
| status | mixed | 1 | The 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[] | 0 | Only items owned by these user IDs. me means the logged-in user. |
| private | bool | user | 1 includes and 0 excludes private items. By default they are included for people allowed to read them. |
| private_only | bool | 0 | 1 shows private items only. |
| post_id | int[] | Only the items with these WordPress post IDs. | |
| blog | int[] | current site | On multisite in Global Tables Mode, the site ID or IDs to take items from. |
| group | string | With 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 | string | current | Only items in this language. For multilingual sites using a supported plugin such as WPML. |
| no_results_msg | string | settings | The text to show when nothing matches. |
| array | bool | 0 | PHP only. Returns arrays of data in place of objects. |
Display parameters
These change how the matched items are shown, not which items match.
| Parameter | Type | Default | Description |
|---|---|---|---|
| view | string | list | For 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[] | settings | The views a visitor can switch between when a search form is shown, such as list,grid,map. See the search form parameters. |
| has_search | bool | 0 | 1 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.
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| scope | string | settings | The 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[] | 0 | Only the events with these event IDs. |
| category | mixed[] | 0 | Category 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[] | 0 | Tag IDs or slugs, with the same rules as category. |
| bookings | mixed | 1 for events with bookings enabled, 0 for events without. user shows the events the logged-in visitor has booked. | |
| active | bool | 1 shows only events with the Active status, 0 leaves them out. Needs Enable Event Status? in the settings, as do the next two. | |
| cancelled | bool | settings | 1 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[] | current | Which 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 | bool | 1 shows only dates of recurring events, 0 shows only one-off events. Unset shows both. | |
| recurrence | int | 0 | Only 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 | bool | 1 lists the recurring and repeating events themselves, not their dates. For custom code. | |
| timeslots | bool | 0 | 1 lists each timeslot of an event as its own item. Calendars take their default from Split by timeslots? in the settings. |
| has_location | bool | 0 | 1 shows only events with a physical location. |
| no_location | bool | 0 | 1 shows only events without a physical location. |
| has_event_location | bool | 1 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 | bool | Pro 1 shows only featured events, 0 leaves them out. See Pay to Post. | |
| location_status | mixed | Only events whose location has this publish status. | |
| month | int | Only events in this month, 1 to 12. | |
| year | int | Only 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 | string | A 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 | string | settings | For grouped lists: daily, weekly, monthly or yearly. |
| date_format | string | settings | For 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
| Value | Events shown |
|---|---|
future | Upcoming events, and events that have started but not ended. |
past | Events that have ended. |
all | Every event. |
today, tomorrow | Events on that day. |
week | Events in the current week, from its first day (as set in WordPress) to its last. |
this-week | Events from today to the end of the week. |
month | Events in the current calendar month. |
this-month | Events from today to the end of the month. |
next-month | Events in the next calendar month. |
1-months, 2-months, 3-months, 6-months, 12-months | Events from today until the end of the month that many months ahead. Any number works. |
2027-03-14 | Events on one date, written yyyy-mm-dd. |
2027-03-01,2027-03-31 | Events 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| location | int[] | 0 | Only 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 | int | settings | The radius for near. |
| near_unit | string | settings | mi or km. |
| eventful | bool | 0 | 1 shows only locations that have events within scope. |
| eventless | bool | 0 | 1 shows only locations with no events within scope. eventful wins if both are set. |
| event_status | mixed | Only 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| calendar_size | string | settings | large, medium or small for a fixed size. Without it the calendar adapts to the space it has. |
| calendar_event_style | string | settings | How 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 | string | aspect | How 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 | string | settings | What happens when a visitor clicks an event: modal, tooltips or none. |
| calendar_preview_mode_date | string | settings | What 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 | bool | 1 | Shows the navigation in the calendar header: the month picker, previous and next links, and the today link. |
| calendar_month_nav | bool | 1 | Shows the month picker. Needs calendar_nav. |
| calendar_nav_nofollow | bool | 0 | 1 adds rel="nofollow" to the navigation links, to keep search engines from crawling month after month. |
| calendar_header | string | normal | centered puts the month name in the middle of the header with the navigation either side. |
| empty_months | bool | 1 | 0 makes the navigation skip months that have no events. |
| calendar_timezone | string | A 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 | bool | 0 | 1 adds a search button to the calendar that opens the search form in a popup. |
| show_search | bool | 0 | With has_search, 1 shows the search form above the calendar. Accepts the search form parameters. |
| limit | int | settings | For calendars, the most events to show on each day, not in total. |
| long_events | bool | settings | 1 shows an event that spans several days on every day it runs. |
| month | int | current | The month to open on. |
| year | int | current | The year to open on. |
| scope | string | all | For 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 | int | auto | The number of week rows. By default as many as the month needs, usually five or six. |
| timeslots | bool | settings | 1 shows each timeslot of an event as its own entry. |
| full | bool | An 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.
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"]