I'm trying to hide all the html if my custom fields are empty in Wordpress
I'm using this:
<?php if (the_field( 'attribute_1' ) & the_field( 'value_1' ) != "") { ?>
<li style="line-height:2.25em;border-top:1px solid #dcdcdc;"><p style="font-size:15px;margin-bottom:0;"><?php the_field( 'attribute_1' ); ?> <span style="float:right;font-weight:600;font-family:'Varela Round';"><?php the_field( 'value_1' ); ?></span></p></li>
<?php } ?>
But only 1 custom field shows up, any ideas why? I've looked into it quite a bit but can't figure it out
the_field( 'attribute_1' )andthe_field( 'value_1' )? You should probably be using&&.&&- that's correct. Yours is not correct.