Conditional placeholders in php template
-
Hi everyone,
I’m creating a custom single-event.php template. I’m not so good in php coding, so I hope somebody can point me in the right direction for basically getting the function of the conditional placeholders into the php template.
The normal placeholders (e.g. #_BOOKINGFORM) work fine with the code snippet below, so I would need now a replacement for the {has_bookings}{/has_bookings}. I guess I have to insert some sort of if-statement, looking if booking for the event has been activated, but how? ?? Many thanks!!<?php global $post; $EM_Event = em_get_event($post->ID, 'post_id'); ?> {has_bookings} <div class="widget-wrapper"> <h3><?php echo __("Booking","my-child-theme"); ?></h3> <?php echo $EM_Event->output("#_BOOKINGFORM"); ?> </div> {/has_bookings}
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Conditional placeholders in php template’ is closed to new replies.