检查字段是否存在

<?php if( get_field('text_field') ): ?>
    <?php the_field('text_field'); ?>
<?php endif; ?>

这里我们使用 get_field() 来确定是否存在值,并使用 the_field() 来回显它。