Home › Forums › General Issues › chage post status when input date equal today › Reply To: chage post status when input date equal today
Adding a CRON in WP would take a while to explain and beyond what I can help you with here.
But in order to change the status of a post based on a field you need to do a query to get every post that is published. Then you need to loop over all the posts and get the ACF field. Then you need to compare the value of the field with the current date and if it is older then you alter the post status.
Here are some examples of similar crons https://wordpress.stackexchange.com/questions/213720/cron-job-to-auto-delete-posts-of-a-specific-post-type-older-than-x-days
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 ACF & ACF PRO 6.0.7 are now available.
— Advanced Custom Fields (@wp_acf) January 18, 2023
✨This release contains bug fixes and improvements while we continue to work on the next major release of ACF.https://t.co/wQgAOpwmUI
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.