Task-Scheduler
Task-Scheduler copied to clipboard
Delete posts older than 30 days
This is a question and not necessarily an issue.
I'm trying to setup a task to run daily that will delete all posts from a post type that were posted over 30 days ago. I read through the documentation and it seems like if I setup a daily task it will delete every post of the post type daily. Is it possible to delete only the posts older than 30 days?
Hi,
There is no option for it. Sorry.
However, a filter for the WP_Query arguments can be added. That way, you can modify the query criteria and achieve what you are looking for.
Are you familiar with coding in PHP?