admin管理员组文章数量:1323702
We are usign this plugin: /
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
}
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';
}
We are usign this plugin: https://wordpress/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
}
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';
}
Share
Improve this question
edited Sep 8, 2020 at 14:59
fuxia♦
107k38 gold badges255 silver badges459 bronze badges
asked Sep 8, 2020 at 7:05
vanuragvanurag
1117 bronze badges
1 Answer
Reset to default 0You need to move your template files - instead of
/wp-content/themes/my-child-theme/plugins/events-manager/templates/event-single.php
you should put them here:
/wp-content/themes/my-child-theme/events-manager/event-single.php
See this documentation page: https://wp-events-plugin/documentation/using-template-files/
本文标签: pluginsSingle Event page based on scope and use of PLACEHOLDER in PHP template file
版权声明:本文标题:plugins - Single Event page based on scope and use of PLACEHOLDER in PHP template file 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742131216a2422168.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论