Viewing 3 replies - 1 through 3 (of 3 total)
  • currently, it’s not deleted automatically for archiving purposes however try to hook into em_content or the_content filter and add some condition that will check the event date then restrict access if past events.

    for reference only: this filter is located at em-events.php
    https://wp-events-plugin.com/documentation/
    https://wp-events-plugin.com/tutorials/

    https://codex.www.ads-software.com/Plugin_API

    Thread Starter melanie71

    (@melanie71)

    Thanks for your reply. Am I assuming that if I make this type of change every time I update Events Manager this change will be undone?? Also, are you able to provide a bit more info about how I actually make this change? Are you able to provide specific code I need to insert somewhere? Thanks in advance.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    you’d need to create this code yourself, but here’s some lines that would get the info you want:

    $events = EM_Event::get(array('scope'=>'past');
    EM_Event->delete($events);

    chances are you’ll want to create a daily cron job using WP Cron, which executes these two lines. Search “WP Cron” on google for tutorials on doing that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Events Manager] Past events pages not being deleted’ is closed to new replies.