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

  • 關於本站
  • 免責聲明