Conditional tags in PHP?
-
Hi there, love the plugin!
I’ve created a custom php template for my event detail pages and I’m wondering how I can use the conditional tags with it.
For example, this is how I’m loading the booking form:
<?php echo $EM_Event->output("#_BOOKINGFORM"); ?>
How would I go about using the {has_bookings}{/has_bookings} conditional tags with that? I’d only like to display the booking form content if bookings are enabled for the event. Currently it shows the message ‘Online bookings are not available for this event’. I’d like to just not display that block at all.
So I guess what I need is the equivalent to this:
{has_bookings}
<?php echo $EM_Event->output(“#_BOOKINGFORM”); ?>
{/has_bookings}Thanks!
- The topic ‘Conditional tags in PHP?’ is closed to new replies.