[wp-hackers] Pull Latest Post from Each of 6 Categories
paul at codehooligans.com
Mon May 4 22:08:11 GMT 2009
Are you handling the display of the posts from the 6 categories in
groups? Meaning are you:
1. Query for 6 posts in category 'A'. Display loop of items.
2. Query for 6 posts in category 'B'. Display loop of items.
3. Query for 6 posts in category 'C'. Display loop of items.
Or is it more like Query post from category A,B,C,D,E,F. Display loop
I'm not sure why you are using 6 different WP_Query instances.
On May 4, 2009, at 4:42 PM, Nathan Rice wrote:
> I was wondering if there are any WP_Query hackers out there who
> might be
> able to help me achieve what I'm looking to achieve here.
> I have a site which has a section on the homepage that pulls the
> latest post
> from each of 6 different categories. As of now, I'm running 6
> instances of WP_Query to get the latest post from each of the 6
> I would very much like to reduce this down to only a single query, if
> Is there any combination of parameters I can pass to "new WP_Query"
> in order
> to get it to return the latest post from each of the 6 categories.
> If so, that would be awesome.
> My Website
> My Twitter
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers