• Resolved Paraya Pret

    (@visgmr)


    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';
    	
    }
    • This topic was modified 4 years, 2 months ago by Paraya Pret.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    Sorry for the confusion, can I have more details about this? at the moment placeholders for future and past events are the same and event scope is commonly used in the events_list shortcode.

    Thread Starter Paraya Pret

    (@visgmr)

    here is my requirement,

    We want to show the event based on category along with different design layout. Like for category “Webinar”, we do not want to show date and location but for other categories we do want to show date time and location etc. This design will be needs to be applicable on both listing page and single events page.

    What should be the PHP equivalent of PLACEHOLDERS? I can use get_post_meta but not all items are showing up.

    Also we want to limit the upcoming events items to some “n” numbers.

    We also want to change the event title to display as “This is my :<br/> Event Title”. Meaning adding a line break when we find “:” in event title.

    • This reply was modified 4 years, 2 months ago by Paraya Pret.
    Plugin Support angelo_nwl

    (@angelo_nwl)

    For single events templates, you can modify the template file at events-manager/templates/templates/event-single.php

    For placeholders in PHP version, you can find it under events-manager/classes/em-event.php

    to use templates: https://wp-events-plugin.com/documentation/using-template-files/

    eg. wp-content/themes/Your Theme/plugins/events-manager/templates/event-single.php

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.