I’ve been trying to figure out why i can’t update the value of a sub field like this. Hopefully someone can explain this for me. This is my current code for my acf/save_post hook in my functions.php file:
After the first have_rows() loop you no longer need to supply the post ID
// post id not needed in sub loops
if( have_rows('codegroep') ):
while( have_rows('codegroep') ) :
Other than this the only reason I know of that the row cannot be update is that there are not rows to begin with and have_rows() is false. You cannot use have_rows() loops to update repeaters that have no values/rows.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users