Support

Account

Home Forums General Issues Add taxonomy terms to custom post type from posts in relationship field Reply To: Add taxonomy terms to custom post type from posts in relationship field

  • I’m a little confuse about which way you want to add.

    But you could

    1. create an acf/save_post action
    2. Get the terms of the post being saved
    3. Loop over the relationship field and get the terms for each post
    4. use wp_add_object_terms() to update either/or the side you want to inherit the terms from

    The above is simplified because you’d probably also want to deal with when relationships are removed or terms are updated on one site or the other. This can get complicated because you’d have to track both what the terms on each side were and what they are being changed to.