Ok thanks. Now I have something like that:
<?php if ( have_posts() ) : ?>
<?php $counter = 0; ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php $counter++; ?>
<?php echo $counter. ' — '; the_title(); echo '<br>'; ?>
<?php if ($counter == 2) { echo 'odd 2<Br><br>'; } ?>
<?php if ($counter == 5) { echo 'even 3<Br><br>'; } ?>
<?php if ($counter == 7) { echo 'odd 2<Br><br>'; } ?>
<?php if ($counter == 10) { echo 'even 3<Br><br>'; } ?>
<?php endwhile; ?>
<?php endif; ?>
Can it be simplified more? ($counter == 2… $counter == 5…)
—
Thanks @alchymyth, I’ll try your version! <3