<!-- the loop-->
<?php if (have_posts()) : ?>
<!-- new variable for post count -->
<?php $c = 0; ?>
<!-- begin THE LOOP -->
<?php while (have_posts()) : the_post(); ?>
<!--open div class-->
<?php if ($c == 0 || $c == 10 || $c == 20 || $c == 30 ) { ?> <div class="slider"> <?php } ?>
<!-- increments post count with each post -->
<?php $c++; ?>
<!-- post content -->
<div class="post"><?php the_content(); ?></div>
<!--close div class-->
<?php if ($c == 10 || $c == 20 || $c == 30 ) { ?> </div> <?php } ?>
<!-- end of the loop-->
<?php endwhile; else:?>
Obvious problem doesn’t go to infinity,
And a bigger problem is that the div will not close if not a 10th post, so if the post is like 24 will not be able to close the div. But I am sure ill find a work around and update.