Home › Forums › Backend Issues (wp-admin) › Delete Repeater Row After Date › Reply To: Delete Repeater Row After Date
In order to do this you would need to set up a cron task https://codex.wordpress.org/Category:WP-Cron_Functions. In your cron you would need to get all of the posts, or whatever it is that this repeater is related to. The loop over this and check the row values and then use update_field() https://www.advancedcustomfields.com/resources/update_field/ or possibly delete_row https://www.advancedcustomfields.com/resources/delete_row/ to get rid of the ones you don’t want.
Alternately, instead of using a cron you might be able to do this work inside of an acf/save_post filter https://www.advancedcustomfields.com/resources/acf-save_post/, but this would only update the values for a post when it is updated.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.