Posted: October 30, 2015 at 4:56 am
|
Hi there, I am working with the wp_schedule_event function to check once a day, which events are expired and add them to a certain category. Please note: you will have to create the expired category first and edit the code with the slug. Also you should keep in mind, that this queries ALL events except those which are already expired and that could cause a massive load time once the event is fired. (The wp_schedule_event function is not like a real cron job, so it fires on pageload if the timelimit set is reached). Code above: No guarantee it is working.
|
|
Oh and please note, that the example code fires hourly, not daily, you’ll have to adapt it. |
|
Ignore this, found a bug, I’ll let you know when I have it fixed |
Hi Olaf, Here’s another suggestion you can use in a WordPress page template: |
|
The support post ‘Show expired events only’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.