Shortcodes
Shortcodes#
Use shortcodes to display events in posts, pages, and widget areas. Shortcodes work in the classic editor, the Shortcode block, text widgets, and theme templates.
Available shortcodes#
| Shortcode | Description |
|---|---|
[emwc_calendar] | Interactive event calendar |
[emwc_events] | Event list or grid |
[emwc_event] | Single event embed |
[emwc_upcoming] | Compact upcoming events list |
[emwc_venue_map] | Google Map for a venue |
Calendar shortcode#
Display a month calendar or a list of upcoming events.
Basic usage#
[emwc_calendar]
Attributes#
| Attribute | Values | Default | Description |
|---|---|---|---|
view | month, list | month | Initial calendar view |
category | slug | - | Filter by category slug |
year | number | current year | Month view start year |
month | 1-12 | current month | Month view start month |
show_nav | yes, no | yes | Show previous/next month arrows |
show_today | yes, no | yes | Show the Today button |
view="week" is accepted but renders the month view. The list view shows the next 20 upcoming events.
Examples#
Month view for one category:
[emwc_calendar category="workshops"]
Calendar that opens on a set month:
[emwc_calendar year="2026" month="12"]
List view without navigation:
[emwc_calendar view="list" show_nav="no"]
Events shortcode#
Display events as a list, grid, or compact list.
Basic usage#
[emwc_events]
Attributes#
| Attribute | Values | Default | Description |
|---|---|---|---|
limit | number | 10 | Number of events |
layout | list, grid, compact | list | Display style |
columns | number | 3 | Grid columns (grid layout only) |
category | slug | - | Filter by category, comma separated |
featured | yes, no | no | Featured events only |
past | yes, no | no | Include past events |
orderby | date, title | date | Sort field |
order | ASC, DESC | ASC | Sort direction |
show_image | yes, no | yes | Display thumbnails |
show_date | yes, no | yes | Display the date box |
show_time | yes, no | yes | Display the start time |
show_venue | yes, no | yes | Display the venue name |
The list and grid layouts print the event excerpt when the event has one. The compact layout hides it.
Examples#
Six events in a two column grid:
[emwc_events layout="grid" limit="6" columns="2"]
Featured events only:
[emwc_events featured="yes" limit="4"]
Two categories:
[emwc_events category="workshops,webinars"]
Past events, newest first:
[emwc_events past="yes" order="DESC"]
Compact list without images:
[emwc_events layout="compact" show_image="no"]
Event shortcode#
Embed one event with its details and content.
Basic usage#
[emwc_event id="123"]
Attributes#
| Attribute | Values | Default | Description |
|---|---|---|---|
id | post ID | - | Event to show (required) |
show_image | yes, no | yes | Display the featured image |
show_meta | yes, no | yes | Display the date, time, and venue |
The output ends with a View Full Event Details button that links to the event page. Find the ID in the URL when editing the event.
Upcoming events shortcode#
Compact list for sidebars and small spaces.
Basic usage#
[emwc_upcoming]
Attributes#
| Attribute | Values | Default | Description |
|---|---|---|---|
limit | number | 5 | Number of events |
category | slug | - | Filter by category |
show_date | yes, no | yes | Display dates |
show_venue | yes, no | yes | Display venues |
Examples#
Ten upcoming events:
[emwc_upcoming limit="10"]
One category, no venue:
[emwc_upcoming category="webinars" show_venue="no"]
Venue map shortcode#
Show a Google Map for a venue. Needs a Google Maps API Key in Events > Settings > Google Maps and a venue with a full address.
Basic usage#
[emwc_venue_map id="45"]
Attributes#
| Attribute | Values | Default | Description |
|---|---|---|---|
id | venue post ID | - | Venue (required) |
width | number with px, %, em, rem | 100% | Map width |
height | number with px, %, em, rem | 300px | Map height |
zoom | 1-20 | Default Zoom Level | Map zoom |
Using shortcodes#
In the classic editor#
- Place the cursor where you want the events
- Type the shortcode
- Preview or publish
In the block editor#
- Add a Shortcode block
- Enter the shortcode
- Preview the page
In widgets#
- Add a Text widget
- Enter the shortcode
- Save the widget
In theme templates#
<?php echo do_shortcode( '[emwc_events limit="4"]' ); ?>
Category slugs#
Find category slugs at Events > Event Categories. The slug shows in the Slug column and when editing a category.
Styling#
CSS classes#
Shortcode output uses these classes:
/* Calendar */
.emwc-calendar {
}
.emwc-calendar-table {
}
.emwc-event-list {
}
/* Events */
.emwc-events {
}
.emwc-events-list {
}
.emwc-events-grid {
}
.emwc-events-compact {
}
.emwc-event-card {
}
/* Single event */
.emwc-single-event {
}
/* Upcoming */
.emwc-upcoming-events {
}
.emwc-upcoming-item {
}
/* Venue map */
.emwc-map-container {
}
Custom styling#
Add CSS in your theme or the Customizer:
/* Larger event titles */
.emwc-event-card .emwc-event-title {
font-size: 1.5em;
}
/* Different grid gap */
.emwc-events-grid {
gap: 30px;
}
Troubleshooting#
Shortcode shows as text#
- Check the plugin is active
- Check for typos in the shortcode name
- Check shortcodes run in that context
No events display#
- Check events are published
- Check the category slug if filtering
- Past events are hidden unless
past="yes"
Map does not show#
- Add a Google Maps API key
- Check the venue has an address that can be geocoded
Layout issues#
columnsonly applies tolayout="grid"- Test in a default theme to rule out theme CSS