logo
  • 教程列表
  • SO官方文档
  • the_filed()
    • 检查字段是否存在
  1. StackOverflow 文档
  2. advanced-custom-fields 教程
  3. the_filed()
  4. 检查字段是否存在

检查字段是否存在

Created: November-22, 2018

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

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

  • the_filed()

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明