Hi guys,
this might have been asked before, but maybe I simply didn’t find it:
When I am in list view and I have events which are spanning over several weeks and months, the list keeps showing the event in the starting month. This makes the event look outdated. So I have written a quick filter to remove the date-header:
/* Tribe Events: Remove the month header in the list view view if the starting month has passed */
function tribe_remove_past_date_headers($html, $event_month, $event_year){
if(date('Ym', tribe_get_start_date(null, false, 'U')) < date('Ym') ){
$html = '';
}
return $html;
}
add_filter( 'tribe_events_list_the_date_headers', 'tribe_remove_past_date_headers', 10, 2 );
I have also modified the “list/single-event.php” to check if a longterm event has started already. It then displays the end-date instead with a little “until” pre-text before it.
It would be nice if there would be a default way to do this. Maybe the snippet above helps anyone else though.
Cya
Felix