have you tried events-list.php ?
Is that the template for each individual “box” like on the link I sent, or the entire page – I thought that was the whole page template?
Thanks
Russell
yes, however abit confuse now; is that link is a events or category listing?
For Events List: events-list.php
For Category List: categories-list.php
For Location List: locations-list.php
That link is a normal page which is displaying events on it using:
[events_list limit=6 town=pacha]
I’ve looked at the events-list.php file and I’m confused on how I can change the output of each event, it looks as though it’s just controlling the event search and pagination rather than each individual event listing,
ta
Thanks for your help Agelonwl,
Can you advise how to merge these two bits of code please? Been trying all morning but failing miserably 🙁 I’d really appreciate it!
<?php echo EM_Events::output(array('format'=>
'<a href="#_EVENTURL" border=0>Test</a>
<B>#_EVENTLINK</B><br/>#_EVENTDATES #_EVENTTIMES<BR/><i>#_LOCATIONNAME, #_LOCATIONADDRESS, #_LOCATIONTOWN </i><br/>
<strong>!!!!!!!!EVENT LINK SHOWS HERE IF ITS SET!!!!!!!!</strong><HR>',
'limit'=>20, 'pagination'=>1)); ?>
and
<?php if(isset($attr['affiliate']) && !empty($attr['affiliate'])){
echo '<a href="'.$attr['affiliate'].'"><strong>Buy a ticket</strong></a>';
}?>
You can do something like these:
event-list.php
echo EM_Events::output(array('format'=>
'#_EVENTLINK</B><br/>#_EVENTDATES #_EVENTTIMES<BR/><i>#_LOCATIONNAME, #_LOCATIONADDRESS, #_LOCATIONTOWN </i><br/>
{has_attribute}<a href="#_ATT{affiliate}"><strong>Buy a ticket</strong></a>{/has_attribute}<HR>',
'limit'=>20, 'pagination'=>1));
in your theme functions.php
add_action('em_event_output_condition', 'my_em_has_attribute_event_output_condition', 1, 4);
function my_em_has_attribute_event_output_condition($replacement, $condition, $match, $EM_Event){
if( is_object($EM_Event) && preg_match('/^has_attribute$/',$condition, $matches) ){
if( !in_array($args['affiliate'],$EM_Event->event_attributes) && !empty($EM_Event->event_attributes['affiliate']) ){
$replacement = preg_replace("/\{\/?$condition\}/", '', $match);
}else{
$replacement = '';
}
}
return $replacement;
}
note: modify as needed
Excellent 🙂 thank you so much for your help – that’s brilliant 🙂