I wouldn’t use WP_Query as that will over-write the query for the current page/post/etc.
Instead I’d use the get_posts() function and query the database directly using that.
Thread Starter
roniel
(@roniel)
Fair enough. What arguments would you give get_posts() if you wanted posts 1-4 in one div and posts 5-8 in another?
Something like this…
$col_1 = get_posts (array (
"numberposts" => 4,
"orderby" => "post_date",
"order" => "DESC"
));
$col_2 = get_posts (array (
"numberposts" => 4,
"offset" => 4,
"orderby" => "post_date",
"order" => "DESC"
));
That’s not etested, so you might have to play around with the settings a bit.
Thread Starter
roniel
(@roniel)
Yeah the offset argument works! Thank you so much!
This is when I should mention that you really should take the time to look through the codes page that I linked to before, and that way you’ll be able ot see what this function can do for yourself. The codex is a great source of info, and can easily answer questions like this.