Testing for ACF empty (null) field
-
I’m trying to test the value of a ACF custom field. Content type=product.
I tried the following:
[if content type=product field=equipment value=empty]
<p>no value for field</p>
[else]
<h2>EQUIPMENT</h2>
[content type=product field=equipment]
[/if]but it’s returning “no value for field” every time.
Do I need to create a check box that essentially is to be checked if content is provided for the custom field equipment?
[if content type=product field=checkbox_equipment value=0]
<p>no value for field (or leave blank)</p>
[else]
<h2>EQUIPMENT</h2>
[content type=product field=equipment]
[/if]I did find this exact question from a few years ago in this forum, but no one answered it and now it’s closed.
The page I need help with: [log in to see the link]
The topic ‘Testing for ACF empty (null) field’ is closed to new replies.