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:
#_EVENTNAMEdisplays the name of the event#_ADDRESSdisplays the address#_TOWNdisplays the town#_EVENTDETAILS (or #_NOTES)displays the details of the event#_EVENTIDdisplays the unique event ID, in case you want some unique identifier#_EXCERPTshows an excerpt of the event (this is the content of#_NOTESuntill you place a<!––more––>marker#_LINKEDNAMEdisplays the event name with a link to the event page#_EVENTPAGEURLsimply 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#_EDITEVENTLINKinserts a link to the edit event page, only if a user is logged in#_ADDBOOKINGFORMadds a form which allows the visitors to register for an event. The form is displayed only if RSVP is enabled for the given event.#_REMOVEBOOKINGFORMadds 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.#_ADDBOOKINGFORM_IF_NOT_REGISTEREDadds 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).#_REMOVEBOOKINGFORM_IF_REGISTEREDadds 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).#_CONTACTNAMEdisplays the name of the event contact person#_CONTACTEMAILdisplays the e-mail of the event contact person#_CONTACTPHONEdisplays the phone of the event contact person#_EVENTCATEGORIESdisplays a comma-separated list of categories an event is in#_DIRECTIONSdisplays a small form so you can ask for driving directions to an event/location#_ICALLINKdisplays a link for an ICAL representation of the event#_ICALURLsimply prints the ICAL URL. You can use this placeholder to build your own customised links#_PAST_FUTURE_CLASSreturning 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#_RESERVEDSPACES (or #_BOOKEDSEATS)gives the number of seats registered in total for an event#_AVAILABLESPACES (or #_AVAILABLESEATS)gives the number of seats free for an event#_TOTALSPACES (or #_TOTALSEATS)gives the number of seats in total for an event#_USER_RESERVEDSPACES (or #_USER_BOOKEDSEATS)gives the number of seats a users has registered for an event (works only for logged in users of course)#_ATTENDEESwill return a html-list of names attending the event (formatted via the setting “Attendees list format”)#_LATITUDEand#_LONGITUDEreturn the langitude and longitude for the location of the event (if present)#_CALENDAR_DAYreturns the day being viewed when viewing a specific day on the calendar#_PRICEor#_EVENTPRICEreturns the price of an event (if any)#_PRICExxor#_EVENTPRICExx(with xx being a number) returns the xx-th price of a multi-price event (if any). E.g.: #_PRICE3#_CURRENCYreturns the currency of an event (if any)#_RECURRENCEDESCshows the recurrence info for an event like it does in the admin backend#_CURRENCYreturns the currency of an event (if any)#_EVENTIMAGEreturns the featured image for the event (if any)#_EVENTIMAGEURLreturns just the url to the featured image of the event, if you want to create your own links or smaller image or soLocation placeholdersEvery 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.
Time placeholders
To add temporal information about the events, use PHP syntax format characters with a # before them. For example:
#ddisplays the day of the month, with 2 digits with leading zeros#mdisplays the short textual representation of a month, three letters (jan through dec)- etc
To display the event end time use the PHP syntax format characters with a #@ before them (e.g.: #@h or #@i).
If you have problems with the date shortcodes because they get interpreted wrong, like e.g. when you use
#Y#dT#m (“T” just stands for the letter T)
it will try to interpret #dT and not #d followed by “T”. To get around this, use the following notation using curly brackets:
#_{Y}#_{d}T#_{m} or, shorter (just use curly brackets when there is a possibility it gets interpreted wrong, and you can put more php date notations in curly brackets:
#_{Yd}T#m.
The same goes for end dates: #@_{Yd}T#_{m}.
Other example, for easier formatting: #_{d/m/Y}
Some users with older PHP/MySQL versions cannot display time properly through the aforementioned placeholders. They are advised to use the following premade time placeholders:
#_24HSTARTTIMEdisplays the start time in a 24 hours format (ex: 16:30)#_24HENDTIMEdisplays the end time in a 24 hours format (ex: 18:30)#_12HSTARTTIMEdisplays the start time in a 12 hours format (ex: 4:30 PM)#_12HENDTIMEdisplays the start time in a 12 hours format (ex: 6:30 PM)
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 …