<?php if ( have_posts() ) : $count = 0; query_posts('cat=1'); while (have_posts()) : the_post(); $count++; ?> <div class="<?php if (($count == 2) || ($count == 7) || ($count == 11)) {echo 'col-md-8';} else {echo 'col-md-4';} ?>"> <a href="<?php the_permalink(); ?>"><div class="special_item"> <div class="special_item_white"> <?php if( get_field('ico_w') ): ?> <img src="<?php the_field('ico_w'); ?>" alt=""> <?php endif; ?> <?php the_title(); ?> </div> <div class="special_img"> <div class="special_shadow"></div> <?php the_post_thumbnail(); ?> </div> <div class="special_item_after"> <?php the_excerpt(); ?> </div> </div></a> </div> <?php endwhile; endif; wp_reset_query(); ?>
Четный не четный пост