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:
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.
Was this ever resolved? I have 5.8.3 (latest as of today) and there’s no such magic in the conditionals: https://www.advancedcustomfields.com/blog/acf-pro-5-7-0-new-architecture-new-features/
What did I miss?
Using Classic Editor. No Gutenberg mess for us. Thanks for any pointers!
The topic ‘Conditional logic for taxonomy field has no "is equal to"’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!