id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses
21660,'p' arg should work with custom post types,batmoo,,"Doing a query like following, where 42 is a custom post_type, will fail:
{{{
$query = new WP_Query( array( 'p' => 42 ) );
}}}
The resulting query looks like:
{{{
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID = 42 AND wp_posts.post_type = 'post' ORDER BY wp_posts.post_date DESC
}}}
This is because WP_Query forces the {{{post_type}}} arg to 'post' when it's not set. We should not force it when the {{{p}}} arg is set.",enhancement,closed,normal,,Query,,normal,duplicate,,,