SO
Size: a a a
SO
IP
SO
SO
SO
IP
IP
SO
Д
$i = 0;
while ( $custom_posts_quary->have_posts() ) :
$custom_posts_quary->the_post();
$i++;
if ( $i % 2 == 0 ) echo ' custom-class';
endwhile;
A
M
M
M
M
M
ВБ
while ( $custom_posts_quary->have_posts() ) :
$custom_posts_quary->the_post();
if ( ( $custom_posts_quary->current_post + 1 ) % 2 == 0 ) echo 'custom_class';
endwhile;
ВБ
ВБ
if ( ( $custom_posts_quary->current_post + 1 ) % 3 == 1 ) echo 'я третий еллемент цикла';
A
M