Advanced Custom Fields – Check multiple Empty Fields [closed]

Note that get_field returns false and not an empty string when no value is found. It’s not written in the docs there but you can try a var_dump on an empty get_field item to confirm.

So you should check them against false. I’ve broken down each condition on its own line for the sake of simplicity:

<?php 
if(
    ( false === get_field('linked_in') ) && #no linked_in value
    ( false === get_field('twitter') ) && #no twitter value
    ( false === get_field('facebook') )  #no facebook value
  ): 
?>
<span class="small">There are no Social Media links to display</span>
<?php endif; ?>

Test for return value of get_field on an item that does not exist:

var_dump( get_field('dummy_string',232) );
// results: bool(false)