Duplicate events in the calendar
-
I have plugins Events Manager and Events Manager WPML Compatibility installed for a long time. They have worked correctly until now, but since version 5.8 the events in the calendar are duplicated, in languages.
To solve it I had to modify the file “events-manager/classes/em-calendar.php”, in the function “get”, to remove duplicate posts.
This is my code:…
if($events){
//Go through the events and slot them into the right d-m index
//new: remove duplicate posts
$aux = [];
foreach($events as $event) {
$event = apply_filters(’em_calendar_output_loop_start’, $event);
//new: remove duplicate posts
if (!in_array($event[‘post_id’],$aux)){
$aux[] = $event[‘post_id’];
if( $long_events ){
…
}//new
}
}I hope it can be resolved in the future.
Thanks.
- The topic ‘Duplicate events in the calendar’ is closed to new replies.