We are usign this plugin: https://wordpress.org/plugins/events-manager/

We want something like this on a single event page.

I am struggling with how to output PLACEHOLDER in my PHP File:

if(event_scope == PAST){
//Display with this HTML
//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>
    <span class="location-icon"> #_LOCATIONNAME 
<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>
<ul class="event-buttons">
        <li class="register"><a href="#_ATT{registration_link}" target="_blank">Register</a></li>

<div class="next-location">
<p><strong>Upcoming Events:</strong>
<div class="float-map-right">{has_LOCATIONMAP}#_LOCATIONMAP<br />{/has_LOCATIONMAP}
    <h3>Events at This Location</h3>

    echo 'Future';

1 Answer 1


You need to move your template files - instead of


you should put them here:


See this documentation page: https://wp-events-plugin.com/documentation/using-template-files/

  • Thats what I did. Please have a look my question again. The problem is the PLACEHOLDER. What should I use in place of that to display data? For example, what should be the PHP equivalent to {has_location} , #_EVENTIMAGE etc etc etc..
    – vanurag
    Sep 10, 2020 at 14:36
  • I think this is a plugin-specific question? If the template file is working (and I'm not sure how it is if you really put it in the place indicated in your question) then I don't know what you're asking. The "placeholders" seem to be set by the plugin. If you are asking for vanilla PHP or WordPress equivalent code (why?) we'd need to know what you want that code to do. I think you might want to ask this question in the Events Manager support forum.
    – Michelle
    Sep 10, 2020 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.