Auto Delete Events after Event Date

Home Forums Calendar Products Events Calendar PRO Auto Delete Events after Event Date

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1081585
    ariddlelfcc
    Participant

    Hi. 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?

    #1082070
    Brian
    Member

    Hi,

    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

    #1082138
    ariddlelfcc
    Participant

    Brian,

    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:

    View post on imgur.com

    View post on imgur.com

    What are your thoughts? Thanks!

    Aaron

    #1082487
    Brian
    Member

    This 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

    #1082782
    ariddlelfcc
    Participant

    Thanks! This helps me out and I think I have what I need. I appreciate it!

    #1082924
    Brian
    Member

    You’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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Auto Delete Events after Event Date’ is closed to new replies.