【发布时间】:2015-11-10 16:10:46
【问题描述】:
我有 WordPress 和 ACF。这是我用来显示转发器字段的代码
<?php
// check if the repeater field has rows of data
if( have_rows('lineup') ):
// loop through the rows of data
while ( have_rows('lineup') ) : the_row();
// display a sub field value
echo '<p>';
the_sub_field('stage');
echo ' on ';
the_sub_field('date');
the_sub_field('artists');
echo '</p>';
endwhile;
else :
// no rows found
endif;
?>
如果我注释掉艺术家行(这是关系字段),输出是几个阶段和时间段。如果我把它留在里面,源代码的 HTML 会在第一个日期的末尾停止
我的问题是如何在转发器字段中显示关系字段
谢谢
【问题讨论】:
标签: wordpress advanced-custom-fields