我已經使用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