Event formatting

Hint: for time-based or location placeholders related to the event, scroll to the bottom of this page.

The syntax of events format is quite simple. Basically, just write your html code in the usual way. Then you can add a number of placeholders corresponding to the data of the event. Some of them are:

  • #_EVENTDBFIELD{xx} displays the database value of the event property called ‘xx’ (with ‘xx’ being ‘event_id’, ‘event_name’, etc … see eme_events.php, function eme_new_event) This can replace a number of more specific placeholders below (and future placeholders can be avoided like this too)
  • #_EVENTNAME displays the name of the event
  • #_ADDRESS displays the address
  • #_TOWN displays the town
  • #_EVENTDETAILS (or #_NOTES) displays the details of the event
  • #_EVENTID displays the unique event ID, in case you want some unique identifier
  • #_SINGLE_EVENTPAGE_EVENTID returns the event id of the single event page currently shown. Can be used in e.g. a widget to show extra info for a single event that you don’t want to show in the event main page.
  • #_EXCERPT shows an excerpt of the event. This is either the content of #_NOTES until you place a <!––more––> marker, or if the more-marker is not present: the first 55 characters (number can be changed by using the filter eme_excerpt_length).
    If the more-marker is present, the layout of the section stays preserved. If the more-marker is not present, all html tags and carriage returns are filtered out (like for regular wordpress excerpts).
  • #_LINKEDNAME displays the event name with a link to the event page
  • #_EVENTPAGEURL or #_EVENTURL simply prints the event URL. You can use this placeholder to build your own customised links
  • #_EVENTPAGEURL{xx} prints the event URL for event ID xx
  • #_EDITEVENTLINK inserts a link to the edit event page, only if a user is logged in and is allowed to edit the event
  • #_EDITEVENTURL just shows the link to the edit event page (if a user is logged in and is allowed to edit the event), not clickable like #_EDITEVENTLINK is
  • #_EVENTPRINTBOOKINGSLINK inserts a link to the print bookings for an event, only if a user is logged in and is allowed to view the bookings for the event
  • #_EVENTPRINTBOOKINGSURL just shows the link to the print bookings for an event, only if a user is logged in and is allowed to view the bookings for the event, not clickable like #_EVENTPRINTBOOKINGSLINK is
  • #_EVENTCSVBOOKINGSLINK inserts a link to the csv export of the bookings for an event, only if a user is logged in and is allowed to view the bookings for the event is
  • #_EVENTCSVBOOKINGSURL just shows the to the csv export of the bookings for an event, only if a user is logged in and is allowed to view the bookings for the event, not clickable like #_EVENTCSVBOOKINGSLINK is
  • #_ADDBOOKINGFORM adds a form which allows the visitors to register for an event. The form is displayed only if RSVP is enabled for the given event. See the placeholder doc concerning ‘Registration form fields’ to change the format of the form.
  • #_CANCELBOOKINGFORM adds a form which allows the visitors to remove their registration for an event. The form is displayed only if RSVP is enabled for the given event. See the placeholder doc concerning ‘Cancel registration form fields’ to change the format of the form.
  • #_ADDBOOKINGFORM_IF_NOT_REGISTERED adds a form which allows the visitors to register for an event. The form is displayed only if RSVP is enabled for the given event and if the user hasn’t registered yet (only possible to detect if the RSVP is for WP registered users only). See the placeholder doc concerning ‘Registration form fields’ to change the format of the form.
  • #_CANCELBOOKINGFORM_IF_REGISTERED adds a form which allows the visitors to remove their registration for an event. The form is displayed only if RSVP is enabled for the given event and if the user has registered already (only possible to detect if the RSVP is for WP registered users only). See the placeholder doc concerning ‘Cancel registration form fields’ to change the format of the form.
  • #_ADDBOOKINGFORM_IF_LOGGED_IN shows the RSVP form only to logged in WP users. The difference with the RSVP option “Require WP membership for booking” is that here the form is not prefilled with WP user info, while by using “Require WP membership for booking” it is and the form info can’t be changed then.
  • #_ADDBOOKINGFORM_IF_USER_IN_GROUP{xxx} shows the RSVP form only if the logged in WP user is part of the EME group called ‘xxx’. Multiple groups can be used if separated by a comma.
  • #_ADDBOOKINGFORM_IF_USER_IS_MEMBER_OF{xxx} shows the RSVP form only if the logged in WP user is a member of the EME membership called ‘xxx’. Multiple memberships can be used if separated by a comma.
  • #_ADDBOOKINGFORM_IF_USER_HAS_ROLE{xxx} shows the RSVP form only if the logged in WP user has the WP role called ‘xxx’. Multiple roles can be used if separated by a comma.
  • #_ADDBOOKINGFORM_IF_USER_HAS_CAP{xxx} shows the RSVP form only if the logged in WP user has the WP capability called ‘xxx’. Multiple capabilities can be used if separated by a comma.
  • #_CONTACTNAME or #_CONTACTPERSON displays the dispname of the event contact person if that user is not linked to an EME person, or the full EME name if that user is linked to an EME person. If the event contact (they are all WP accounts) is linked to an EME person, you can use #_CONTACT followed by any person placeholders (e.g. #_CONTACTNAME, #_CONTACTADDRESS1, all people placeholders preceded by “CONTACT”) to show EME info from that person. If the contact is not linked to an EME person, the placeholders #_CONTACTDISPNAME, #_CONTACTLASTNAME and #_CONTACTLASTNAME are still supported as well.
  • #_CONTACTEMAIL displays the e-mail of the event contact person
  • #_CONTACTPHONE displays the phone of the event contact person
  • #_AUTHORNAME displays the name of the event author. If the event contact or author (or membership contact, they are all WP accounts) is linked to an EME person, you can use #_AUTHOR followed by any person placeholders (e.g. #_AUTHORNAME, #_AUTHORADDRESS1, all people placeholders preceded by “AUTHOR”) to show EME info from that person. If the contact is not linked to an EME person, the placeholders #_AUTHORDISPNAME, #_AUTHORLASTNAME and #_AUTHORLASTNAME are still supported as well.
  • #_AUTHOREMAIL displays the e-mail of the event author
  • #_AUTHORPHONE displays the phone of the event author
  • #_EVENTCATEGORIES displays a comma-separated list of categories an event is in.
    In case you want to show or hide specific categories, you can do so by specifying 2 optional filters to include/exclude categories. To be used like this:
    #_EVENTCATEGORIES{1,3}{} ==> this will get all categories for the event, but only show cat 1 or 3
    #_EVENTCATEGORIES{}{1,3} ==> this will get all categories for the event, but not show cat 1 or 3
  • #_EVENTCATEGORYIDS returns the different category id’s for an event. Not really usefull, unless you use the shortcode No events inside a single event format, resulting in a list of events in the same categories as the one being viewed
  • #_EVENTCATEGORIES_CSS display a space-separated list of categories (so you can use them to do css stuff based on these names). Exclusions as in #_EVENTCATEGORIES are possible.
  • #_EVENTCATEGORYDESCRIPTIONS returns the different category descriptions for an event. The same optional filters to include/exclude categories as for #_EVENTCATEGORIES can also be used here.
  • #_LINKEDCATEGORIES creates a link per category for the corresponding event, linking to a list of future events for that category. The same optional filters to include/exclude categories as for #_EVENTCATEGORIES can also be used here.
  • #_DIRECTIONS displays a small form so you can ask for driving directions to an event/location
  • #_ICALLINK displays a link for an ICAL representation of the event
  • #_ICALURL simply prints the ICAL URL. You can use this placeholder to build your own customised links
  • #_EXTERNALURL returns the external URL for the event (if any)
  • #_PAST_FUTURE_CLASS returning a string that indicates wether this event is in the future or not (eme-future-event or eme-past-event), can be used as extra CSS to the event list
  • #_RESERVEDSEATS (or #_RESERVEDSPACES, #_BOOKEDSEATS) gives the number of registered seats in total for an event
  • #_RESERVEDSEATS{xx} (or #_RESERVEDSPACES{xx}, #_BOOKEDSEATS{xx}) gives the number of registered seats for the xx-th seat category for a multi-seat event
  • #_AVAILABLESEATS (or #_FREESPACES, #_FREESEATS) gives the number of free seats for an event
  • #_AVAILABLESEATS{xx} (or #_FREESPACES{xx}, #_FREESEATS{xx}) gives the number of free seats for the xx-th seat category for a multi-seat event
  • #_PENDINGSPACES (or #_PENDINGSEATS) gives the number of pending seats for an event
  • #_PENDINGSPACES{xx} (or #_PENDINGSEATS{xx}) gives the number of pending seats for the xx-th seat category for a multi-seat event
  • #_YOUNGPENDINGSEATS: gives the number of pending seats younger than 5 minutes for an event (those are counted as occupied too, even if pending seats are considered as free)
  • #_YOUNGPENDINGSEATS{xx}: gives the number of pending seats younger than 5 minutes for the xx-th seat category for a multi-seat event
  • #_APPROVEDSPACES (or #_APPROVEDSEATS) gives the number of approved seats for an event
  • #_APPROVEDSPACES{xx} (or #_APPROVEDSEATS{xx}) gives the number of approved seats for the xx-th seat category for a multi-seat event
  • #_PAIDSPACES (or #_PAIDSEATS) gives the number of paid seats for an event
  • #_PAIDSPACES{xx} (or #_PAIDSEATS{xx}) gives the number of paid seats for the xx-th seat category for a multi-seat event
  • #_TOTALSPACES (or #_TOTALSEATS) gives the number of seats in total for an event
  • #_TOTALSPACES{xx} (or #_TOTALSEATS{xx}) gives the number of seats in total for the xx-th seat category for a multi-seat event
  • #_USER_BOOKEDSEATS gives the number of seats a users has registered for an event (works only for logged in users of course)
  • #_AVAILABLETASKS (or #_FREETASKS) gives the number of tasks with free spaces for an event
  • #_DAYS_TILL_START returns the number of days until the start of the event
  • #_DAYS_TILL_END returns the number of days until the end of the event
  • #_DAYS_FROM_START returns the number of days from the beginning of the event
  • #_HOURS_TILL_START returns the number of hours until the start of the event
  • #_HOURS_TILL_END returns the number of hours until the end of the event
  • #_HOURS_FROM_START returns the number of hours from the beginning of the event
  • #_ATTENDEES will return a html-list of names attending the event (formatted via the setting “Attendees list format”)
  • #_ATTENDANCE_URL creates an url (and using any other wp plugin create a qr-code), to send to the booker. When entering, this is scanned (by eg a QR-code scanner) and checked:
    1. if it is paid for
    2. if the number of times this link is used is not higher than the amount of seats
    3. only valid 5 hours before the event starts and until the event is finished (these limits can be set per event)
  • #_LATITUDE and #_LONGITUDE return the langitude and longitude for the location of the event (if present)
  • #_CALENDAR_DAY returns the day being viewed when viewing a specific day on the calendar
  • #_PRICE or #_EVENTPRICE returns the price of an event (if any)
  • #_PRICE{xx} or #_EVENTPRICE{xx} (with xx being a number) returns the xx-th price of a multi-price event (if any). E.g.: #_PRICE{3}
  • #_EVENTPRICE_NO_VAT or #_PRICE_NO_VAT returns the price of an event (if any) VAT excluded
  • #_EVENTPRICE_VAT_ONLY or #_PRICE_VAT_ONLY returns the VAT part of the price of an event (if any)
  • #_VAT_PCT returns the VAT percentage applied to the price of this event
  • #_PRICEDESCRIPTION or #_EVENTPRICEDESCRIPTION returns the price description of an event (if any)
  • #_PRICEDESCRIPTION{xx} or #_EVENTPRICEDESCRIPTION{xx} (with xx being a number) returns the xx-th price description of a multi-price event (if any)
  • #_CURRENCY returns the currency of an event (if any)
  • #_CURRENCYSYMBOL returns the currency symbol for the price of an event (if any)
  • #_RECURRENCE_DESC shows the recurrence info for an event like it does in the admin backend
  • #_RECURRENCE_NBR returns the sequence number of an event in a recurrence series (first event is 1, second is 2, etc …)
  • #_EVENTIMAGE returns the featured image for the event (if any)
  • #_EVENTIMAGEURL returns just the url to the featured image of the event, if you want to create your own links or smaller image or so
  • #_EVENTIMAGETHUMB shows a thumbnail of the featured image, instead of the whole image. The size can be choosen in the EME settings (panel ‘Other’), by default it is ‘thumbnail’ size
  • #_EVENTIMAGETHUMB{MyCustomSize} shows a thumbnail of the specified custom size of the featured image, instead of the whole image. The size is a custom size either known to wordpress or defined in your functions.php via the function add_image_size()
  • #_EVENTIMAGETHUMBURL returns the url to the thumbnail
  • #_EVENTIMAGETHUMBURL{MyCustomSize} returns the url to the thumbnail of the specified custom size. The size is a custom size either known to wordpress or defined in your functions.php via the function add_image_size()
  • #_BOOKINGS returns a list of bookings for this event. The format can be customized using the ‘Booking list’ option in the EME settings (there the same placeholders as for RSVP mails can be used). Next to this placeholder, you can also use the code>eme_bookings shortcode if you want different layouts for different events, or use the code>eme_attendees shortcode if you just want to show info on the attendees and not bookings (in general one attendee can make several bookings, that’s why these two shortcodes exist), see the documentation on each of these shortcodes (as event id-option you’ll need to use #_EVENTID then).
  • #_EVENTIMAGETITLE, #_EVENTIMAGEDESCRIPTION, #_EVENTIMAGEALT and #_EVENTIMAGECAPTION return the image title, descripton, alternative title and caption (the 4 wordpress properties you can set for an image)
  • #_ATT{xx}[{yy}] (with xx being an attribute name, and the second braces with {yy} are optional) allows to get the value for an attribute (with ‘yy’ being the default value if nothing has been entered. See the chapter about “Custom attributes” to learn more.
  • #_EVENTATT{xx}{yy} (with xx being an event id and yy being an attribute name) allows to get the non-default value for an attribute from another event. E.g, for eventid 3 and attribute “my_att”: #_EVENTATT{3}{my_att}
  • #_MYLOCATIONATT{xx} (with xx being an attribute name) allows to get the value for an attribute of the location for this event
  • #_RSVPSTART returns the date+time start of the registration period
  • #_RSVPEND returns the date+time end of the registration period
  • #_LOCALE returns the currently chosen locale. Can be used in multilingual setups, so you can change content of anything inside an event, location or form based on the locale active at that time (if no language tags are provided by the language plugin you’re using
  • #_STARTDATE, #_ENDDATE, #_STARTTIME and #_ENDTIME return the date and/or time end of the start/end of the event formatted using your wordpress date/time preferences. See below for more datetime formatting options.
  • #_EVENTCREATIONDATE, #_EVENTMODIFDATE, #_EVENTCREATIONTIME and #_EVENTMODIFTIME return the date and/or time end of the of the event creation/modification. See below for more datetime formatting options.
  • #_EVENT_EXTERNAL_REF returns the external reference for an event (typically the facebook id)
  • #_FIELD{xx} returns the answer (the tag, not the real value chosen for multi-option fields) for the extra form field with ID or name xx. For fields of type “file” it will return a list of clickable links.
  • #_FIELDVALUE{xx} returns the answer (not the tag, but the real value chosen for multi-option fields) for the extra form field with ID or name xx. For fields of type “file” it will return the url to the file.
  • #_FIELDNAME{xx} returns the name for the extra form field with ID or name xx
  • #_WAITING_LIST_ACTIVATED, #_WAITING_LIST_CLOSED, #_WAITINGLISTSEATS, #_BOOKEDWAITINGLISTSEATS and #_AVAILABLEWAITINGLISTSEATS: see the doc on waitinglists
  • #_PASSWORD shows the RSVP password, this is best used in event mails to people if you want to announce the password via mail
  • #_EVENTS_COUNT and #_EVENT_COUNTER (only interpreted for events shown via the shortcode eme_events). This results in the count of events shown in the list (#_EVENTS_COUNT) or the position of the event in the list (#_EVENT_COUNTER)

Location placeholders

Every location placeholder can be used inside an event as well, see the doc for location placeholders.
If you have enabled the Google Map integration, you can use #_MAP to display a map. It is also possible to use #_MAP in the events list page.

Date/Time placeholders

To add temporal information about the events, use PHP syntax format characters combined with #_STARTDATE and #_ENDDATE (and also with #_EVENTCREATIONDATE or #_EVENTMODIFDATE). For example:

  • #_STARTDATE{d} displays the start day of the month, with 2 digits with leading zeros
  • #_STARTDATE{m} displays the short textual representation of a month, three letters (jan through dec)
  • #_ENDDATE{d/m/Y} displays the end day of the month, the month and the year
  • etc

Of course also time-info can be presented the way you want using this syntax, e.g. #_STARTDATE{d/m/Y H:i} will return something like 05/jan/2017 13:04.
You can also use #_STARTDATE , #_STARTTIME , #_ENDDATE and #_ENDTIME (with no optional formatting) which give you the start/end date/time based on your wordpress date/time preferences.
If you want to show the current date or time in your event or form or mail: #_CURDATE and #_CURTIME (give you the current date/time based on your wordpress date/time preferences).

To show the datetime difference between start and end of the event, the following can be used:

  • #_DATETIMEDIFF_START_END show the datetime difference between start and end of the event in days
  • #_DATETIMEDIFF_START_END{xx} show the datetime difference between start and end of the event where you need to replace “xx” by a php date interval format Example: #_DATETIMEDIFF_START_END{%d} will show only the difference in days between the start and the end of the event.

The older syntax (#_{xx} for start datetime and #@_{xx} for end datetime representations) is deprecated, but still functional as to not disrupt current setups.
Also the following premade time placeholders exist:

  • #_24HSTARTTIME displays the start time in a 24 hours format (ex: 16:30)
  • #_24HENDTIME displays the end time in a 24 hours format (ex: 18:30)
  • #_12HSTARTTIME displays the start time in a 12 hours format (ex: 4:30 PM)
  • #_12HENDTIME displays the start time in a 12 hours format (ex: 6:30 PM)
  • #_STARTDATETIME_8601 will display the start datetime in YYYYMMDDHH:MM+timeoffset format (google needs that for its json+ld format)
  • #_ENDDATETIME_8601 will display the end datetime in YYYYMMDDHH:MM+timeoffset format (google needs that for its json+ld format)

To show countdown info (the date/time difference between the start/end of an event and now) or the difference between start and end:

  • #_DATETIMEDIFF_TILL_START, #_DATETIMEDIFF_TILL_END, #_DATETIMEDIFF_FROM_START and #_DATETIMEDIFF_FROM_END returns the datetime difference (countdown) between now and from/until start/end. They produce a string like
    “1 year 3 months 2 days 3 hours 1 min 5 seconds” or (if e.g. the differences for year and month are 0) “2 days 3 hours 1 min 5 seconds”
  • #_DATETIMEDIFF_TILL_START{xx}, #_DATETIMEDIFF_TILL_END{xx}, #_DATETIMEDIFF_FROM_START{xx} and #_DATETIMEDIFF_FROM_END{xx} are variants on the above mentioned datetimediff placeholders where you can replace “xx” by a php date interval format Example: #_DATETIMEDIFF_TILL_START{d} will show only the difference in days between now and the start of the event.

URL escaping

All the placeholders mentioned above can be url-escaped, so you can use them in any url if wanted (eg. see the FAQ section: How to add a “Add to Google Calendar” link to an event). Just prefixing by #URL is enough: #URL_NAME, #URL_EVENTPAGEURL, etc …

Scroll to Top