檢查欄位是否存在

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

這裡我們使用 get_field() 來確定是否存在值,並使用 the_field() 來回顯它。