It is necessary to get all the posts in the array, and then manipulate this array.
$args = array( 'numberposts' => -1, 'post_type' => 'post', ); $posts = get_posts( $args ); for ($i=0; $i < count($posts); $i+=9) { ?> <div> <div class='row-1 left'> <div class='left'><?php if ($i < count($posts)) { echo $posts[$i]->post_content; } ?></div> <div class='center'><?php if (($i + 1) < count($posts)) { echo $posts[$i + 1]->post_content; } ?></div> <div class='right'><?php if (($i + 2) < count($posts)) { echo $posts[$i + 2]->post_content; } ?></div> </div> <div class='row-2 center'> <div class='left_1'><?php if (($i + 3) < count($posts)) { echo $posts[$i + 3]->post_content; } ?></div> <div class='center_1'><?php if (($i + 4) < count($posts)) { echo $posts[$i + 4]->post_content; } ?></div> <div class='right_1'><?php if (($i + 5) < count($posts)) { echo $posts[$i + 5]->post_content; } ?></div> </div> <div class='row-3 right'> <div class='left'><?php if (($i + 6) < count($posts)) { echo $posts[$i + 6]->post_content; } ?></div> <div class='center'><?php if (($i + 7) < count($posts)) { echo $posts[$i + 7]->post_content; } ?></div> <div class='right'><?php if (($i + 8) < count($posts)) { echo $posts[$i + 8]->post_content; } ?></div> </div> </div> <?php } wp_reset_postdata();