[wp-trac] [WordPress Trac] #12704: Multiple post_types can no longer be specified in query
WordPress Trac
wp-trac at lists.automattic.com
Sat Mar 27 05:55:26 UTC 2010
#12704: Multiple post_types can no longer be specified in query
-----------------------------+----------------------------------------------
Reporter: mitchoyoshitaka | Owner: dd32
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.0
Component: Query | Version: 3.0
Severity: normal | Keywords:
-----------------------------+----------------------------------------------
Comment(by dd32):
Commit coming up which i believe will fix this..
I thought about just adding an !is_array() check in there, But i feared
that might cause implementation headaches down the line.
Instead, I'm looping over the post_types, and adding the requests posts to
the listing.
An example SQL:
{{{
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND (1=0 OR
wp_posts.post_name IN('test') OR wp_posts.ID IN(173)) AND
wp_posts.post_type IN ('note', 'wiki') AND (wp_posts.post_status =
'publish') ORDER BY wp_posts.post_date DESC
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12704#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list