1
이것은 내 코드이며 두 번째 자식을 루프에 추가하려고합니다. 내가 어떻게 할 수 있는지 말해줘. 나는 워드 프레스에서 새롭다.워드 프레스 루프에서 특정 자식 클래스를 추가하는 방법
<?php
$args = array(
'posts_per_page' => 3,
'post_type' => 'hosting_plan',
'order' => 'ASC'
);
query_posts($args);
if (have_posts()) : while (have_posts()) : the_post();
?>
<div class="hostplbx /*here i want to add class on second child*/">
<h3><?php the_field('plan_name'); ?></h3>
<div class="hostprice">
<span class="hosprice"><b class="rs"><?php the_field('plan_price'); ?></b> per month</span>
<span class="plandetail"><?php the_field('tag_line'); ?></span>
</div>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php endif; ?>