Taxonomy field not setting post term when inside Cloneable Group

Support MB Group Taxonomy field not setting post term when inside Cloneable GroupResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12046
    Content PilotContent Pilot
    Participant

    I have a group of fields. One of them is a taxonomy field. On save, the term is not being set to the post object. Can I use the taxonomy field inside a group?

    I see the term ID being saved to the database as post_meta since the entire group is being saved as a serialized array.

    Just for troubleshooting sake, when the group is set to clone true or false and sort is set to true or false, the post term is not set.

    #12054
    Anh TranAnh Tran
    Keymaster

    Hi Clayton,

    Unfortunately, the group field saves all values of its children into 1 array, and bypass the behavior of the taxonomy field. If you want to set post terms, then it's a connection between post and terms. Therefore, a top-level taxonomy makes sense, e.g. don't put it inside a group.

    #12129
    Content PilotContent Pilot
    Participant

    I really need this functionality so I wrote a function that runs on save_post. Hopefully is helps somebody else.

    https://ghostbin.com/paste/d92ys

    #12141
    Anh TranAnh Tran
    Keymaster

    Awesome! Thanks a lot for your contribution!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.