PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP $col = 1; ?>
- <?PHP query_posts( array( 'cat' => $cat_id, 'showposts' => $number_entries, 'orderby' => 'date' ) ); ?>
- <?PHP if (have_posts()) : while (have_posts()) : the_post(); ?>
- <?PHP if ($col == 1) echo "<div class=\"row\">"; ?>
- <!-- Контент -->
- <?PHP if ($col == 1) echo "</div>"; if($col == 1) {$col = 2;} else { if($col != 1) { if($col == 5) {$col = 1;} if($col == 2) {$col = 3;} if($col == 3) {$col = 4;} if($col == 4) {$col = 5;} } } ?>
- <?PHP endwhile; ?>
- <!-- Контент -->
- <?PHP else : ?>
- <?PHP endif; ?>