除了<?php has_sub_field(\'vimeo_id\'); ?> 线我希望这样,如果用户填写了该字段,它就会显示出来。否则,什么也看不出来。但是,当用户没有填写该字段时,它仍会显示。我做错了什么?
<?php if( have_rows(\'project\') ): ?>
    <ul>
        <?php while( have_rows(\'project\') ): the_row(); ?>
            <li><a href="#<?php the_sub_field(\'project_name\'); ?>"><?php the_sub_field(\'project_name\'); ?></a></li>
        <?php endwhile; ?>
    </ul>
    <?php while( have_rows(\'project\') ): the_row(); ?>
        <div id="<?php the_sub_field(\'project_name\'); ?>">
            <?php has_sub_field(\'vimeo_id\'); ?>
                <iframe src="//player.vimeo.com/video/<?php the_sub_field(\'vimeo_id\'); ?>?title=0&byline=0&portrait=0&color=ffffff" width="750" height="300" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
        </div>
    <?php endwhile; ?>
<?php endif; ?>