WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Events Manager] Past events pages not being deleted

[Resolved] [Plugin: Events Manager] Past events pages not being deleted

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
    http://wp-events-plugin.com/documentation/
    http://wp-events-plugin.com/tutorials/

    http://codex.wordpress.org/Plugin_API

    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

    @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 ‘[Resolved] [Plugin: Events Manager] Past events pages not being deleted’ is closed to new replies.