WXP Local Events has three kinds of shortcodes: [wxp_events] shows your agenda, [wxp_event_reservation_form] shows the reservation form of one event, and a family of [[wxp_event_...]] field shortcodes show one detail of an event. The agenda and the form are also available as a block and as an Elementor widget.
[wxp_events] #
The agenda: a month calendar or a list, with a pop-up per event.
[wxp_events]
[wxp_events view="list" limit="8" category="music,quiz" toggle="yes"]
[wxp_events month="2030-05"]
Parameters #
| Parameter | Values | Default | What it does |
|---|---|---|---|
view |
month or list |
month |
A calendar grid of the month, or a list of coming events. |
toggle |
yes or no |
no |
Buttons that let visitors switch between month and list. |
category |
category slugs, comma separated | all | Only events in these categories. |
limit |
a number, at most 50 |
10 |
The number of events in the list view. |
month |
a month as 2030-05 |
the current month | The month the calendar opens on. |
template |
default, or a template in your theme |
default |
The layout. |
[wxp_event_reservation_form] #
The reservation form with a dropdown of the coming dates.
[wxp_event_reservation_form event="123"]
[wxp_event_reservation_form event="123" date="2030-03-01"]
| Parameter | Values | Default | What it does |
|---|---|---|---|
event |
the ID of a published event | the event page the form is on | Which event to reserve for. On a page that is not an event, event is required. Editors see a message when it is missing. |
date |
a date as 2030-03-01 |
none | Preselect this date. |
Field shortcodes #
One shortcode per detail of an event. Use them on an event page, in an Elementor loop item, or anywhere with event="123".
| Shortcode | Shows |
|---|---|
[wxp_event_title] |
The title. |
[wxp_event_teaser] |
The short description. |
[wxp_event_description] |
The full description. |
[wxp_event_date] |
The date. |
[wxp_event_weekday] |
The weekday. |
[wxp_event_time] |
The time. |
[wxp_event_price] |
The price. |
[wxp_event_pay_text] |
The payment text, for example “pay at the door”. |
[wxp_event_categories] |
The categories. |
[wxp_event_capacity] |
The number of seats. |
[wxp_event_remaining] |
The number of seats left. |
[wxp_event_age] |
The age remark. |
[wxp_event_image] |
The featured image. |
[wxp_event_url] |
The address of the event page. |
Parameters of the field shortcodes #
| Parameter | Used by | Default | What it does |
|---|---|---|---|
event |
all | the event of the page or loop item | The ID of the event. Without an event, nothing is shown. |
date |
all | the next date | For a recurring event: which date to use, as 2030-03-01. |
format |
wxp_event_date |
the WordPress date format | A PHP date format, for example j F. |
part |
wxp_event_time |
range |
start, end or range (start to end). |
sep |
wxp_event_categories |
, |
The separator between categories. |
size |
wxp_event_image |
large |
The image size. |
link |
wxp_event_url |
no |
yes to output a link instead of the plain address. |
text |
wxp_event_url with link="yes" |
the event title | The text of the link. |
class |
all | none | An extra CSS class on the output. |
Examples:
[wxp_event_date format="j F" event="123"]
[wxp_event_time part="start"]
[wxp_event_url link="yes" text="More information"]
WXP Events Feed (a companion plugin) #
If you show the events of another site, the separate plugin WXP Events Feed offers [wxp_events_feed].
[wxp_events_feed limit="5" category="music" image="yes" description="yes" time="yes" date="site" heading="h3"]
| Parameter | Values | Default | What it does |
|---|---|---|---|
limit |
1 to 20 |
5 |
The number of events. |
category |
category slugs, comma separated | all | Only events in these categories. |
image |
yes or no |
yes |
Show the image. |
image_size |
thumbnail or medium |
thumbnail |
The image size. |
description |
yes or no |
yes |
Show the short description. |
time |
yes or no |
yes |
Show the time. |
date |
site or source |
site |
site formats the dates like this website does. source uses the date text of the events website. |
heading |
h2 to h6, or p |
h3 |
The tag of the event titles. |
class |
text | none | An extra CSS class on the list. |
Good to know #
- Yes and no: wherever a parameter takes
yesorno, you may also writetrue,1oronfor yes. Anything else counts as no. - Showing the code in a page: WordPress runs shortcodes everywhere in the content, also inside code blocks. To show a shortcode as text, write it with double brackets, like in this guide.