Support

Account

Home Forums General Issues Automatically add 7 days to Date Time Picker Reply To: Automatically add 7 days to Date Time Picker

  • You would need to set up a cron to do this. https://codex.wordpress.org/Function_Reference/wp_cron

    I would suggest a cron on the server set in your site control panel rather than a cron in WP because you will need to do a query to get all the posts that might have the date field, loop through all of the posts, get the date field for each post, check to see if it has passed and if it has update the field.

    On a site with only a few post that need to be looked at using WP to do the cron will probably work. But if you have a lot of posts it will slow your site down and may even time out page loads.