Add "is not blank / is blank" to Conditions

Hi. While trying to use Conditions, I realised it is not very intuitive how to conditionnally show an custom field element determined on whether it is blank or not blank. Say I have a button on my (loop’s) card that takes me to a web page in a new window, but only want to show it if a url has been added to the related custom field (otherwise the button takes me to default current url). For the moment, I use “contains” and add “http” which works. But wouldn’t it be a lot more efficient if values “is not blank / is blank” were added to Conditions’ comparing values ?


I agree with your suggestion. I have seem quite a few folks ask for help on this specific situation. While setting condition operator to “!=“ and leaving the value field empty is logical, it is not intuitive. Many people look for the condition operator “is not blank”.

1 Like

Oh yes, that works too. Thanks.

“!=” isn’t working for me. I have an acf repeater for an accordion and on the frontend I want to hide the heading on top of the accordion in case the repeater does not have any content. But the “!=” hides it always no matter it has content or not.

1 Like

Did this ever get updated? I want to hide a block if the data isn’t there. Whats the best practice for checking a field for not-empty?

I’ve added a solution to our problem. It works when an ACF is empty but also when a more complex query is too.

Lets say you use ACF, a button widget and a small text description, you hide the whole container whenever the the button is blank.

Vote the solution as much us possible!!!