Support

Account

Home Forums Bug Reports Conditional logic for taxonomy field has no "is equal to"

Solving

Conditional logic for taxonomy field has no "is equal to"

    • Mayte

    • August 31, 2018 at 3:14 pm

    I want to show/hide a custom field depending on a taxonomy selected from another custom field.

    If taxonomy === ‘article’ then show field ‘article_url’.

    The conditional logic tool when building these fields seems to assume that the return value of the taxonomy field is numeric, offering me only a handful of irrelevant options (is greater than?)

    Expected behaviour: should be able to check for specific taxonomy selection
    Actual behaviour: checking for existence of any / numeric values

  • I don’t know if this is expected behavior or not. This is pretty new and I can’t find anything in the docs about it.

    However, looking at what is available and assuming this is expected behavior.

    Find the term and get it’s ID then set the rules based on the term ID, for example if the term ID is 22

    
    Is grater than 21 AND
    Is less than 23
    
  • +1 for this functionality.

    I found this forum post that started all the way back in 2014 and ended in March 2018 when a link was posted to this post by Elliot:

    https://www.advancedcustomfields.com/blog/acf-pro-5-7-0-new-architecture-new-features/

    That post would imply that Elliot add this functionality in 5.7.0 but it does not appear to be working in 5.8 beta3, so not sure if Gutenberg broke this or something else is going on. Someone created a plugin to address this issue before Elliot posted that 5.7.0 supports it. But I just installed this plugin and it does not appear to be working in WP 5.0 and ACF Pro 5.8 beta3. https://github.com/andrejpavlovic/acf-conditional-logic-advanced

    I guess the only way for me to get around this is to create a Type field that is a select/checkbox list and manually add my values in and then base my conditional logic off of that. Hoping that this functionality will be added back in a future release.

    • pjeaje

    • February 2, 2019 at 9:52 pm

    +1 for this as well. Very strange this isn’t included?

    I tried John Huebner’s idea but it didn’t work.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.