【发布时间】:2019-02-03 01:23:56
【问题描述】:
我正在使用 Wordpress 的高级自定义字段并尝试在组内循环转发器。我得到的只是“注意:数组到字符串的转换...”
出了什么问题以及如何解决?
<?php if( have_rows('start_horlurar') ): while ( have_rows('start_horlurar') ) : the_row(); ?>
<?php $horlur = get_sub_field('horlur'); ?>
<?php if( have_rows( $horlur['arsmodeller_lankar']) ): while ( have_rows($horlur['arsmodeller_lankar']) ) : the_row(); ?>
<?php echo get_sub_field('lank'); ?>
<?php endwhile; endif; ?>
<?php endwhile; endif; ?>
【问题讨论】:
-
请发布最少的代码
-
我做了,但它消失了。
-
什么是“lank”文本或图像或其他字段
-
这是转发器“arsmodeller_lankar”中的子字段
-
试试这个,the_field('lank');
标签: php wordpress while-loop nested-loops advanced-custom-fields