Twitter bootstrap ACF中继器字段向下输出一列,而不是跨三列输出
我有一个带有两个子字段(都是文本)的repeater字段,我希望它们跨三列显示。目前,它们出现在一列中,每个repeater字段出现在一个新行中,而不是出现在三列中 这是我的密码:Twitter bootstrap ACF中继器字段向下输出一列,而不是跨三列输出,twitter-bootstrap,advanced-custom-fields,Twitter Bootstrap,Advanced Custom Fields,我有一个带有两个子字段(都是文本)的repeater字段,我希望它们跨三列显示。目前,它们出现在一列中,每个repeater字段出现在一个新行中,而不是出现在三列中 这是我的密码: <div class="container staff"> <!-- Staff --> <div class="row"> <div class="col-lg-4">
<div class="container staff"> <!-- Staff -->
<div class="row">
<div class="col-lg-4">
<?php if( have_rows('directors_info') ): ?>
<?php while ( have_rows('directors_info') ) : the_row(); ?>
<?php the_sub_field('name'); ?>
<?php the_sub_field('profile'); ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
您只使用一列,而不是在每次迭代中创建一列。 试着这样做:
<div class="container staff"> <!-- Staff -->
<?php if( have_rows('directors_info') ): ?>
<div class="row">
<?php while ( have_rows('directors_info') ) : the_row(); ?>
<div class="col-lg-4">
<?php the_sub_field('name'); ?>
<?php the_sub_field('profile'); ?>
</div>
<?php endwhile; ?>
</div>
<?php endif; ?>
</div>
这会产生类似这样的结果啊,谢谢!!这完全有道理。再次感谢。