[wp-hackers] get_posts and custom post types

Curtis McHale curtis at curtismchale.ca
Mon Aug 16 16:28:40 UTC 2010

I haven't had any trouble in any of the 3 projects I'm currently working 
on dealing with custom post types (nor the two already live).

scribu wrote:
> On Mon, Aug 16, 2010 at 5:59 PM, Simon Blackbourn<piemanek at gmail.com>wrote:
>> I'm currently using get_posts on several sites to retrieve custom post
>> types.
>> But I've just noticed that in the parameters section of the Codex page for
>> get_posts [1], a big bunch of text has been struck through and replaced
>> with
>> this new message:
>> *get_posts() only works with posts of the post_type "post". It will produce
>> unexpected results when used to retrieve custom post types or pages.*
>> I have not personally noticed any problems, so can anyone expand on what
>> issues may arise?
> When noticing things like this, you should look at who made the change. My
> guess is it was an unexperienced user who had trouble:
> http://codex.wordpress.org/index.php?title=Template_Tags%2Fget_posts&diff=91997&oldid=86154

Curtis McHale


More information about the wp-hackers mailing list