6回ごとに繰り返したいのですが、なぜこの構造が思い通りに繰り返されないのかわかりません。
これが私のコードです
<?php
query_posts( 'posts_per_page=12' );
$counter = 0;           
while (have_posts()) : the_post(); 
if($counter % 6 == 0) :
    echo '<div class="row margin-top20">';
endif; ?>           
    <div class="two columns">
        <?php the_title(); ?>
        <?php the_post_thumbnail('thumbnail'); ?> 
    </div>
<?php
if($counter % 6 == 0) :
        echo '</div>';
    endif;
endwhile; ?>