Splitting loop into groups of three
Hi, I am trying to split a loop of post from a certain category into groups of three. I have managed to get the first group to show, but as soon as I try to add a new instance of the loop the page goes blank. Any ideas of what I am doing wrong?
Above the second loop I have added this:
<?php $args = array( 'cat' => 3, 'posts_per_page' => 3, 'order' => 'ASC', 'offset' => 3 ); query_posts( $args ); ?>
Third loop would be offset 6 and so on.
I want to have rows of three posts, where content can be expanded beneath a post. It looks good if I display all posts in a single loop, but when content from one post is expanded it screws up the layout beneath. That’s why I need to be able to group them as three, but I am happy to get other suggestions of how to make this work too 🙂
- The topic ‘Splitting loop into groups of three’ is closed to new replies.