[wp-hackers] Pull Latest Post from Each of 6 Categories

modder poster at communitymodder.com
Tue May 5 01:25:01 GMT 2009

If you would only want to do this in one instance then it would probably 
make sense to just use the direct sql method then adjust it as wordpress 
upgrades. I really think that the concerns about upgrading are 
unfounded. Aside from the fact that the database schema does not change 
very often, an existing query can easily be adjusted to factor in schema 
changes at the point you decide to upgrade. However, this is only 
practical on a single site. I would definitely not suggest this for a 
plugin developer.

One option would be to simply extend the WP_Query class to factor in the 
flexibility you require. That way you can use your new custom class in 
your special case without breaking anything. This method would be most 
usefully if you require the same sort of functionality all over your 
site. It would still be good however to keep note of changes to the 
WP_Query class.

More information about the wp-hackers mailing list