Support » Plugin: WP Event Manager » Delete event after end date

  • Resolved tm86


    i know there are several topics about this, but it just won´t work in my case. I just want to hide all events 1 day after their end date in the frontend. So obviously when you only set start and end date, but no expiry date, the events will still show up after the end date.
    So I either need a line of code to tell event manager not to show any event that is 1 day over its end date, or I need some code that will set the expiry date to “end-date +1) automatically, every an event is being created. I dont want to set the expiry date on my own, because I dont need this. You understand my issue?
    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hitesh Makvana


    Hi @tm86,

    Yes, please enable hide expired listing settings from Event listing->Settings-> Event listing-Hide expired listing.

    Once you have set up expired listing it will clear expired events automatically by running cron job every hour. Make sure your hosting support cron job.

    Thank you



    i am sorry, but that is not my problem. It won´t hide any event, because I dont have a date put in for the event to expire. I only set the start and end date of the event. I dont set and dont want to set any expiry date manually. It should be created automatically. So every time I or a user of the website creates a new event the expiry date should be created like this “expiry date=end date +1).

    Plugin Author Hitesh Makvana


    Hi @tm86 ,

    WP Event Manager will set your event expiry date as per your settings defined in Event listing -> settings -> Event submission.

    By default it will set event end date as event expiry date.

    Thank you

    Thanks I think it will work now.

    I have a similar request:
    I want to avoid the need for entering an end date or an expiration date.
    Is there a way to automatically set the expiration date to (start date + 1 day)?

    Here is an example:

    The user creates a new event that starts 17.05.2021 @ 19:00 o´clock and ends on the same day @ 22:00 o´clock.
    If no expiration date is set, the event will never expire and will be shown in the event list forever.
    The only way to let the event expire correctly is to manually set an expiration date to (start date + 1 day).

    This is prone for errors and many users will forget to set an expiration date or make a mistake when entering the value.

    It would be very nice if the expiration date would automatically be calculated somehow like this:

    if (!empty(_end_date) && (_end_date != _start_date)) {
    _expiration_date = _end_date;
    } else {
    _expiration_date = (_start_date + 1 day);

    If there is a way I can add a filter or an action to a hook to perform the above, please tell me how to do it! 🙂

    @eff16 I too am looking for that. Did you try to get that code to work? Any luck?

    I took this topic to a new thread:

    I did not try the solution provided there, yet, but I will do so shortly.


Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.