我已经使用WordPress中的高级自定义字段创建了图像库。现在我需要添加一个if语句,它会回显一个新的div,并在每三个图像之后用行的类关闭它。我试图自己做,但它不起作用。我哪里错了? <div class="container">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php t
我使用ACF和不知道如何管理替换DIV类名,如果custom_field数量是 equal and less then 30 class="color1"
equal and less then 50 class="color2"
equal and less then 90 class="color3"
Can you please tell me how to do that?
我想我会简化我的问题。 这可能是一个PHP问题,所以我先进的道歉,因为这可能不是一个ACF问题,但它可能是一个问题,我不知道足够的PHP,我不知道为什么这不起作用。 所以我使用ACF中继器字段,并且我想在字段中没有数据输入时隐藏中继器子字段。 <?php
// check if the repeater field has rows of data
$feature_pos