Hey Ingrid,
Thanks for reaching out on this, I’ll help you getting the events right!
Once you import a feed and delete the events the imported save a ‘note’ for that event not to be re-imported. Maybe that’a affecting you here?
If so, please add the following snippet to your theme’s functions.php file, and reload the admin page until all deleted events notes are cleared:
/*
* Deletes the saved copy of "deleted" events generated by iCal Importer
* This allows you to re-import events. The script deletes 50 instances per page load
*/
$posts = get_posts( array( 'numberposts' => 50, 'post_type' =>'deleted_event') );
if (!empty($posts)) {
foreach ($posts as $post) {
wp_delete_post( $post->ID, true);
}
} else {
echo 'Done deleting!';
}
Once you are done you can comment the script or remove it from the file.
To prevent this behaviour in the future, add this other bit of code:
/*
* Prevents iCal importer from saving a copy of "deleted" events
* This means when you rerun an import, it will reimport any events you previously deleted
*/
function tribe_ical_dont_save_deleted () {
$ical_importer = Tribe__Events__Ical_Importer__Main::instance();
remove_action( 'before_delete_post', array( $ical_importer, 'deletedEventSave' ) );
}
add_action( 'wp_loaded', 'tribe_ical_dont_save_deleted' );
Please let me know if this helps,
Best,
Nico