Is it possible after a certain amount of posts to close of a list and start a new one, like so...
Particularly after 6 posts...
<ul id="carousel">
<li>
<ul class="inner-items">
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
</ul>
</li>
<li>
<ul class="inner-items">
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
<li>Post content</li>
</ul>
</li>
</ul>
Something like this but obviously it needs to count he posts, if at all possible?
<?php $loop = new WP_Query( array( 'post_type' => 'work','posts_per_page' => '-1' ) ); ?>
<ul id="carousel">
<li>
<ul class="inner-items">
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li>
<?php the_content(); ?>
<?php the_post_thumbnail( 'work-thumb' ); ?>
</li>
<?php endwhile; ?>
</ul>
</li>
</ul>
I'm not even sure if possible, but any help would be great thanks :)