Conditional placeholders in shortcode?
-
Is there a way to use the conditional placeholders in a standard WP shortcode?
I would like to create a shortcode [my_shortcode] that echos data depending on conditional placeholders like {has_bookings}
So if I use [my_shortcode] in the normal single event page it will process the conditional placeholders, just like it does in the settings page.For example:
shortcode -> [my_shortcode]
{has_bookings}Yes, there are tickets{/has_bookings}
{no_bookings}No tickets here…{/no_bookings}I know how to create a normal shortcode of course, but how do I get it to process the EM codes? The same idea is that putting #_24HSTARTTIME in the Event content page, it will show the code and not the processed data.
Is there a snippet to use the existing {placeholders} or do I really need to recreate them with $EM_Event->bookings->open etc?
- The topic ‘Conditional placeholders in shortcode?’ is closed to new replies.