【发布时间】:2017-11-01 23:14:02
【问题描述】:
所以我想重复这段代码。使用wordpress acf生成图片:
`<div class="row">
<?php if( get_field('image_1') ): ?>
<img class="this-image" src="<?php the_field('image_1'); ?>" />
<?php endif; ?>
</div>`
我只是想知道如何循环这个我还需要增加数字(即 image_1、image_2、image_3)。
我在搞清楚PHP的逻辑时遇到了麻烦,如果已经有类似的帖子,将不胜感激,谢谢!
【问题讨论】:
-
您可以使用
For Loop或While Loop来完成此操作
标签: php html wordpress twitter-bootstrap advanced-custom-fields