WordPress query posts into two Divs
Posted
by Cameron
on Stack Overflow
See other posts from Stack Overflow
or by Cameron
Published on 2010-03-28T12:02:32Z
Indexed on
2010/03/28
12:03 UTC
Read the original article
Hit count: 346
I want to display my wordpress posts in a category in two divs. So for example:
<div id="left">
POST 1
POST 3
POST 5
POST 7
</div>
<div id="right"
POST 2
POST 4
POST 6
POST 8
</div>
So want I need to do is tell the query_posts to somehow start spitting out the first 4 posts oddly and then evenly for each div. I don't want to have two seperate WP_Queries as this is a category.php file and needs to have the default loop. Not quite sure how to do this.
Any help much appreciated.
© Stack Overflow or respective owner