Custom Fields
Support Meta Box Builder Using Conditional Logic with Taxonomies

  • Creator
  • #13489
    Alex Mansfield

    As far as I can tell (although I hope I’m wrong), it looks like meta boxes can be shown/hidden based on the value of a custom field, but not based on whether or not the post has a particular taxonomy term. Is that correct? I think I read about a way to do this with code, but I was really hoping to be able to do it from the Builder plugin. Is that possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
  • #13529
    Anh Tran

    Hi Alex,

    The Builder lacks of supporting for taxonomies for Conditional Logic at the moment. You can do that with Custom Attributes in the Advanced tabs. The attributes can be found in docs of Conditional Logic docs here:

    Mark Tenney

    Anh, I have tried this, but it only seems to work if a taxonomy has been selected and saved to the post. I have been trying to show fields based on the selection of a taxonomy_advanced field before saving the post with no luck.

    Anh Tran

    Hi Mark,

    For taxonomy_advanced field, it works similar to any other field.

    You can use contains or in condition and both works. Remember to use term ID to specify the value.

    So, you can write the condition like this:

    'visible' => ['field_id', 'contains', 4], // 4 is the term ID


    'visible' => ['field_id', 'in', [4, 2]], // 4, 2 are term IDs. In this case, the field will be visible if the tax_advanced has any term with the ID specified.

    Please see this video for demo:


    Hopefully we see a more visual way to select taxonomy terms (like hierarchical).


    I need this feature too. Any update as to if it will be coming to Builder anytime soon?

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