[wp-hackers] Pull Latest Post from Each of 6 Categories
mikeschinkel at newclarity.net
Mon May 4 22:03:26 GMT 2009
You are probably going to need to use "posts_where" and "posts_join"
hooks. Definitely not ideal, but since WP_Query() unfortunately
doesn't handle that level of complexity, that's what you'll need. Are
you familiar with how to build that query in SQL?
WordPress Custom Plugins
On May 4, 2009, at 5: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