I have the following so far:
<?php $count = 0; while (have_posts()) : the_post(); $count++; ?>
<?php if ($count < 5) : ?>
//four posts here, all them wrapped in one div, these will also have different markup
<?php the_title();?>
<?php else : ?>
//remaining six posts here, all of them wrapped in one div, these will also have different markup
<?php the_title();?> blah
<?php the_excerpt();?>
<?php endif; ?>
<?php endwhile; ?>
I want to wrap the first 4 in a ‘<div class="top"></div>
‘ and the bottom 6, I want all of them wrapped in a ‘<div class="bottom"></div>
‘
Any tips of how this can be done using the while loop would be greatly appreciated
Try the below snippet.
This might help you.