What would be a PHP command to erase all posts from category X from the last month?
The first step is setting up the cron job. The second part requires querying the database for a specific post type where the entry is older than 1 week. We can do this with get_posts() and specifying the category argument and the date_query argument. //* If the scheduled event got removed from the cron schedule, … Read more