SOLVED: ACF true/false value not usable in element conditions

I think this is still an issue for Options pages.

Niether true/false or 1/0 produce any results.

For anyone interested, here is a return function that will work with ID by default or options:

function custom_get_acf_boolean($field, $location = "ID") {
    $location = $location === "options" ? "options" : get_the_id();
    $field = get_field($field, $location);
    return $field ? "1" : "0";
}

Then use == or != with 1 or 0

ex

1 Like