Home › Forums › Calendar Products › Events Calendar PRO › Auto Delete Events after Event Date
- This topic has 5 replies, 2 voices, and was last updated 10 years, 1 month ago by
Brian.
-
AuthorPosts
-
February 24, 2016 at 10:37 am #1081585
ariddlelfcc
ParticipantHi. I am trying to find a way to have events either be placed in the trash or set to draft status after it has past their event date for a certain time. So for instance, if we posted an event to be held on March 1, 30 days after the event ended, it would be removed from the calendar so it could not be seen by site visitors.
I have looked into some of the other forum posts here and see that one suggestion is to use the BulkWP plugin to delete posts marked with the custom post type of “tribe_events”. However, this basis the removal of the post on the published date…not the date the event is actually held. For example, an event occurring on March 1, 2016 may have been posted to the site on January 30, 2016…so it would be removed.
Somehow I need to tell the BulkWP plugin to target the event’s date and base the deletion scheduler per that field. Is that a meta field, or a custom field I should be targeting?
February 25, 2016 at 9:30 am #1082070Brian
MemberHi,
Thanks for using our plugins. I can try to help out here, but limited in supporting features outside of what we ship with.
Our plugin uses the following custom fields for start and end date:
_EventStartDate
_EventEndDate
We have this list of all the custom fields too:
https://theeventscalendar.com/knowledgebase/wordpress-post-meta-data/
So maybe the BulkWP plugin can read that and remove it?
Let me know if you have any follow up questions.
Thanks
February 25, 2016 at 11:57 am #1082138ariddlelfcc
ParticipantBrian,
Thanks for the reply! I think I am on the right track, but still need some help. I am including two screenshots of the options the bulk delete plugin gives me. I know I need to select “tribe_events” as the post type, and am assuming “_EventEndDate” is the Key…however I am unsure what to place in the “Value” box or the “Enter Date Format” box.
Screenshots:
What are your thoughts? Thanks!
Aaron
February 26, 2016 at 9:01 am #1082487Brian
MemberThis is the date format:
YYYY-MM-DD HH:MM:SS
To go in the Date Format.
I am not sure what they accept as a value if they can do somethine like 2 days ago.
That would be a question for BulkWP
That is about all I have for this.
Cheers
February 26, 2016 at 4:56 pm #1082782ariddlelfcc
ParticipantThanks! This helps me out and I think I have what I need. I appreciate it!
February 27, 2016 at 9:51 am #1082924Brian
MemberYou’re Welcome.
Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.
Thanks
-
AuthorPosts
- The topic ‘Auto Delete Events after Event Date’ is closed to new replies.
