- June 13, 2018 at 9:27 PM #10182
I have used this for a custom taxonomy but it doesn’t seem to be working, anything I am clearly doing wrong or anything I need to include?
array( 'name' => 'Off Market Property?', 'id' => self::$prefix . 'off_market', 'type' => 'checkbox', 'tab' => 'general', 'visible' => array( 'slug:tax_query[_property_destinations]', 'in', array(7,9) ), ),
ThanksJune 14, 2018 at 12:28 AM #10186
I came here to ask the same question. The conditional show/hide doesn’t seem to work on the taxonomy select fields, and checkboxes.June 19, 2018 at 5:35 PM #10254
Sorry anyone have an answer to this as have a project that needs this implemented.June 20, 2018 at 8:42 PM #10274
Can you try:
1 – Changing from number
2 – Using the term slugs instead of id?July 9, 2018 at 11:18 PM #10501
Sorry for the late reply I have been away the last 2 weeks. I have just tried both and no luck with either.
Just to confirm this will show the field if in any of those categories?
ThanksJuly 11, 2018 at 4:05 PM #10514
Yes, that’s what the condition says. However, I think the problem might be: the value of a taxonomy is always an array (as we can select multiple terms to assign to a post). So it’s not correct to says one array “in” another array. Can you try “contains” one value, and add another condition for the other value?July 12, 2018 at 9:08 PM #10553
Nope unfortunately not:
'visible' => array( 'slug:tax_query[_property_destinations]', 'contains', 'france' ),
You must be logged in to reply to this topic.