Home › Forums › Calendar Products › Events Calendar PRO › how do I remove all events from calendar
- This topic has 17 replies, 2 voices, and was last updated 6 years, 4 months ago by besouro.
-
AuthorPosts
-
January 4, 2018 at 12:15 pm #1418268besouroParticipant
how do I remove all events from calendar
January 4, 2018 at 3:31 pm #1418415CrisoforoKeymasterHey Bryan!
I hope you are doing great, at the moment we don’t have a built int functionality to do so but WordPress comes already with a Bulk Edit feature that you can use to do this. We already have a series of steps that you can use in order to do this.
Let me know if you have any other questions about this or if there is anything else I can do for you.
Best
CrisoforoJanuary 4, 2018 at 4:35 pm #1418432besouroParticipantcould i do it from the database
January 4, 2018 at 5:39 pm #1418449CrisoforoKeymasterYes is something you can do as well but personally I don’t recommend as will bypass multiple WordPress filters and hooks that will detach other values / fields from the events so my suggestion will be use the bulk editor instead in order to run those automatically by WordPress as well.
Let me know if there is anything else I can do for you.
Best
CrisoforoJanuary 4, 2018 at 7:07 pm #1418524besouroParticipantwhat table do the event reside in on the database? bc they are not deleting with bulk delete
January 4, 2018 at 7:16 pm #1418526CrisoforoKeymasterThey are stored under
wp-posts
But there are other fields that are stored on:
wp-postmeta
Make sure to clean your trash in order to remove the items completely. So this should be the right flow:
Bulk Edit > Change status to draft > Remove all draft items > Remove trash
All this can be done directly from the edit panel as noted on the answer on the other thread.
Let me know if you have any other questions.
Thanks,
CrisoforoJanuary 4, 2018 at 7:23 pm #1418527besouroParticipantwont it be possible just to write a sql statement to just remove all hooks & post from database and if so could you help?
January 4, 2018 at 7:26 pm #1418531besouroParticipantcouldn’t you just modify this SQL statement to delete all events?
/*
With events that were imported via iCal, when deleted the calendar still
remembers them a bit so they don’t get reimported. This SQL Query will truly
delete all those events.
The query and steps below is modified version of that in this tutorial:
It is recommended that you read the source article above before proceeding.
In particular it mentioned the importance of making backups before running
SQL queries. 🙂
*/delete a,b,c,d
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id )
LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
LEFT JOIN wp_terms e ON ( e.term_id = d.term_id )
WHERE a.post_type = ‘deleted_event’January 4, 2018 at 7:32 pm #1418535CrisoforoKeymasterHey!.
You only need to change the type of the post you want to target in this case:
WHERE a.post_type = ‘deleted_event’
Into
WHERE a.post_type = ‘tribe_events’
Let me know if there is anything else I can do for you.
Thanks,
CrisoforoJanuary 4, 2018 at 7:41 pm #1418541besouroParticipantso then
delete a,b,c,d
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id )
LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
LEFT JOIN wp_terms e ON ( e.term_id = d.term_id )
WHERE a.post_type = ‘tribe_events’January 4, 2018 at 7:42 pm #1418543besouroParticipantdelete a,b,c,d
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id )
LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
LEFT JOIN wp_terms e ON ( e.term_id = d.term_id )
WHERE a.post_type = ‘tribe_events’
it got this errorJanuary 4, 2018 at 7:50 pm #1418555besouroParticipantgetting an error
January 4, 2018 at 8:06 pm #1418559besouroParticipantcan you correct the statement so it works?
January 5, 2018 at 7:52 am #1418839besouroParticipantCAN YOU ASSIST ME???
I AM GETTING AN ERROR WHEN I TRY TO RUN THE STATEMENT.January 5, 2018 at 8:42 am #1418970CrisoforoKeymasterSeems like you are having an issue with your quotes, make sure to use single quotes on:
'tribe_events';
So you get something like this at the end.
DELETE a,b,c,d FROM wp_posts a LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id ) LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id ) LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id ) LEFT JOIN wp_terms e ON ( e.term_id = d.term_id ) WHERE a.post_type = 'tribe_events';
Let me know if you have any other questions.
Thanks,
Crisoforo -
AuthorPosts
- The topic ‘how do I remove all events from calendar’ is closed to new replies.