Benefit of taxonomy advanced field type

Support General Benefit of taxonomy advanced field typeResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #40858
    Lydia CookLydia Cook
    Participant

    Hi,
    I see that a few people have asked before what the difference is between the taxonomy field and the taxonomy advanced field and in the docs the answer is the first sets the post terms while the second stores the term ids. What isn't explained is what the benefit of storing terms IDs is over setting post terms and when to use one field type rather than the other. Is there also a difference in how you would go and query taxonomy data for each field type?
    Thanks.

    #40870
    PeterPeter
    Moderator

    Hello,

    You can read more about the benefit when using the custom field and custom taxonomy here https://metabox.io/custom-fields-vs-custom-taxonomies/

    #40874
    Lydia CookLydia Cook
    Participant

    Thanks Peter. But the documentation doesn't explain the benefit of using the taxonomy advanced field type over the taxonomy field type in a CPT. Why is storing term IDs better than 'setting' terms?

    #40875
    Lydia CookLydia Cook
    Participant

    OK so the only benefit I can see is that if you had multiple taxonomy fields in one CPT all pointing to the same custom taxonomy, then if these fields were of the regular taxonomy type, all chosen values would be set the same after saving, whereas if they were all of the taxonomy advanced type, all the selections would be preserved as the data is saved into the postmeta.
    Not sure why you would have multiple taxonomy fields in a CPT pointing to the same custom taxonomy though.

    #40894
    PeterPeter
    Moderator

    Hello,

    FYI, the taxonomy field does not work when it is a subfield in a group or in a custom block. So in this case, you will need to use the taxonomy_advanced field. As the name, it will need for some advanced cases.

    #47303
    Scott BrimScott Brim
    Participant

    FYI, the taxonomy field does not work when it is a subfield in a group or in a custom block. So in this case, you will need to use the taxonomy_advanced field. As the name, it will need for some advanced cases.

    Is that still true? The advantages of Taxonomy Advanced are still a mystery to me. Thanks.

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