我有一个中继器,我将在下面显示它不会返回任何错误,也不会返回任何内容。(回声不起作用)
我正在尝试显示子字段 officetype,但这是设置:
Offices(repeater)->Officetypeinfo(repeater)->多个子字段(如officetype)
谁能告诉我我做错了什么,如果你需要比我提供的更多,请告诉我。
<?php if( get_field('offices')): ?>
<?php while( has_sub_field('offices')): ?>
<?php if( get_sub_field('officetypeinfo')): ?>
<?php while( has_sub_field('officetypeinfo')): ?>
<?php
$show = the_sub_field('officetype');
echo $show;
the_sub_field('officetype');
?>
<?php endwhile; ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
提前致谢!