I use Wordpress and ACF plugin to create add. fields on the site. In the admin there is a link to Facebook.
In the site template, it is displayed as follows:
<?php the_field('facebook', 'option'); ?> I want to make a condition for the withdrawal so that in the case of an empty field it is not displayed in the template. I tried this option:
<?php if( (the_field('facebook', 'option'))!="") { ?> ---- <?php } ?> If not empty, output. If empty, then nothing should be displayed.
Tell me what am I doing wrong?