Don’t display html if custom field is empty

I have no experience with WP UI, but the following code might do the trick:

            <!-- Videos Tab -->

<h3 class="wp-tab-title">Videos</h3>

<?php if (get_field('videos') && get_field('videos') != "") { ?>

    <div class="wp-tab-content">

        <?php the_field('videos'); ?>

    </div><!-- Close Videos --> 

<?php } ?>

Leave a Comment