[wp-trac] [WordPress Trac] #12704: Multiple post_types can no longer be specified in query
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 14 19:13:47 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 prettyboymp):
This solution creates a problem where a taxonomy can't have the same name
of a post_type. So having a post_type of 'download' and a related
taxonomy name 'download' you get a query that looks like this when trying
to view a post named 'american-red-cross' (original queryvars = download
=american-red-cross, post_type=download):
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND (1=0
OR wp_posts.post_name IN('american-red-cross')) AND 0 AND
wp_posts.post_type = 'download' AND (wp_posts.post_status = 'publish' OR
wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT
0, 20
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12704#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list