Single Event page based on scope and use of PLACEHOLDER in PHP template file
-
Hi,
We want something like this
if(event_scope == PAST){ //Display with this HTML } else{ //Normal Display }
To achieve this, I have copied single event file to /wp-content/themes/my-child-theme/plugins/events-manager/templates/event-single.php
and here is the code I added. Its working but I dont know what to use in the Placeholders
if($EM_Event->event_end_date < date('Y-m-d')){ echo 'PAST'; <div class="single-event-detail-header">Event Details</div> <div class="single-event-desc"> <div class="event-image">#_EVENTIMAGE</div> <ul class="event-details-list"> <li><span class="date-icon">#l | #_EVENTDATES</span></li> <li><span class="time-icon">#_EVENTTIMES </span></li> {has_location} <li> <span class="location-icon"> #_LOCATIONNAME #_LOCATIONADDRESS #_LOCATIONTOWN #_LOCATIONSTATE #_LOCATIONPOSTCODE </span></li> {/has_location} [listMembertypes] {no_location} <li><img class="video-confress" src="/wp-content/uploads/2020/08/video.png" alt="" style="width: 18px;"><span class="zoom-webinar" style="left: 13px;">Zoom Webinar</span></li> {/no_location} </ul> </div> <ul class="event-buttons"> <li class="register"><a href="#_ATT{registration_link}" target="_blank">Register</a></li> </ul> #_EVENTNOTES {has_bookings} <h3>Bookings</h3> #_BOOKINGFORM {/has_bookings} <div class="next-location"> <p><strong>Upcoming Events:</strong> #_LOCATIONNEXTEVENTS </div> </br> <div class="float-map-right">{has_LOCATIONMAP}#_LOCATIONMAP<br />{/has_LOCATIONMAP} {has_locationnextevents} <h3>Events at This Location</h3> {/has_locationnextevents} </div> ?> <?php }else{ echo 'Future'; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Single Event page based on scope and use of PLACEHOLDER in PHP template file’ is closed to new replies.