Not sure what I’m doing wrong. Have a taxonomy select in a repeater, where I’m trying to allow the user to select their category for a list. But it always resets back to the first available category after saving.
Have Load and Save Terms and using Term Object for the return. Everything loads in the front end, but it simply won’t save any selections.
Load/Save terms will not work correctly with a taxonomy field in a repeater. The reason is that each works independently of the others. Each time the terms are saved to the post the previous terms are removed. Save and load terms cannot be used for repeater sub fields.
In order to do this in a repeater you have to build your own save terms function using an acf/save_post action. In the action you need to loop over repeater and build an array of terms to add and then set the post terms yourself.
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