With the new Conditions Builder how would you hide a Div if a custom field is empty.
I’m using acf for custom fields and have a Parent div with two child div’s. One has static text and the other has dynamic text pulling from a custom field (location-phone). If the location-phone field is not empty the entire div should display. If empty the entire div should not show.
I attached a photo of what I’ve tried but its not working. Any thoughts or ideas.
In this case I’m using the post widget to check if two different post types share a specific ACF value in commun. I do all that with the meta query option but if I don’t get any results I would like to hide the container that includes those related posts (the container with the title, description and post widget).
I’m doing that with a small helper function but it would be nice to hide something if a specific widget is blank.
I have a DIV containing a header and values from a checkbox CPT created with JetEngine. I wanted to hide the DIV when there are no checkboxes selected in the post. Following the above instructions from this thread did not work for me. The DIV was not hiding even though no checkbox results were showing on the front end.
Reached out to support and Charaf suggested that since a value is outputted as ‘false’ when no checkboxes are selected, you need to type ‘false’ in the conditions section as shown in the screenshot.
If you have 5 checkboxes in your CPT, you will need to type false 5 times. e.g. false, false, false, false, false. If you have 10 checkboxes then you need to type false 10 times and so on.
This works when it comes to hiding elements that contain checkbox values.