Contents
How to use placeholders in PHP event manager?
Events Manager allows extremely flexible date formatting by using PHP date syntax format characters along with placeholders. Prepend # or #@ before a valid PHP date syntax format character to show start and end date/time information respectively (e.g. #F will show the starting month name like “January”, #@h shows the end hour).
Where to find templating syntax in event manager?
Events Manager has a templating syntax that lets you customise events information in the events list and pages. You can use this syntax both in the Events Manager Settings page and in the template tags or shortcodes that you might insert in your theme templates or pages/posts.
How do you add placeholders in a HTML page?
The syntax is quite simple, just write your html code in the usual way, then you can add a number of placeholders corresponding to the information you want to show. See the bottom of this page for a few examples. When you’d like to show information pertaining to events, you can choose from the following.
In all cases, you should also be able to call location related placeholders. Shows the event ID number in the wp_em_events table. Shows the event corresponding Post ID in the wp_posts table. Displays the name of the event. Shows the description of the event. If an excerpt has been added to the event, it will be used.
How to create custom placeholder for event formatting events?
In the event you’ll accept extra arguments in your placeholder, $result will contain the full placeholder with the brackets, therefore you would need to alter your code accordingly to check you still have a #_STYLES placeholder, and then parse the bracket arguments. Like so for example: Next Steps…
How to create conditional placeholders in event manager?
For most purposes, em_event_output_show_condition will suffice since you only need to determine whether the condition requested is true (i.e. show the content), or not (i.e. hide the content), and EM will do the rest. Both filters are applied to every conditional placeholders, including the default placeholders that come with Events Manager.
How to create a placeholder for an em event?
$replace is the value of what this placeholder would be replaced with (and since this is not an EM placeholder, this would always be an empty string). $EM_Event is the EM_Event object currently being output. $result is the placeholder currently being parsed.