[wp-hackers] showposts/posts_per_page bug?

Jeremy Clarke jer at simianuprising.com
Sun Dec 19 22:49:12 UTC 2010


FWIW you guys should avoid get_posts() either way, it's a loser function and
I don't know any use-cases where you aren't better off fetching the full
WP_Query object instead by doing:

$myresults = new WP_Query($args);

That way you can do $myresults->have_posts() and friends. It's also almost
definitely less buggy than get_posts() because core developers probably
never use get_posts(). Glad to see the bug with fixed though :)

-- 
Jeremy Clarke
Code and Design • globalvoicesonline.org


More information about the wp-hackers mailing list