Home › Forums › Add-ons › Repeater Field › Update Repeater Sub Field › Reply To: Update Repeater Sub Field
Hi @nitins
1. Use the get_posts
function to return all the posts you want
2. Loop over the posts
3. For each post, update the value
To update the value, either use a WP function such as update_post_meta
or the ACF function update_field
.
Please note that update_field
will only work to update a repeater field, not a sub field within a repeater.
Saving a repeater field: http://support.advancedcustomfields.com/forums/topic/update_field-with-repeater-fields-issue/
Thanks
E
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.