Support

Account

Home Forums Add-ons Repeater Field category taxonomy in repeater not saving Reply To: category taxonomy in repeater not saving

  • 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.

    See https://developer.wordpress.org/reference/functions/wp_set_post_terms/, when ACF sets the post terms the $append argument is set to false.

    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.