[wp-trac] [WordPress Trac] #13020: WP_Query - Post type ignored in taxonomy queries.
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 15 18:30:59 UTC 2010
#13020: WP_Query - Post type ignored in taxonomy queries.
--------------------------+-------------------------------------------------
Reporter: d910qf | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 3.0
Severity: normal | Keywords: taxonomies, query
--------------------------+-------------------------------------------------
Hi,
I posted this to the wp-hackers mailing list - when you specify a taxonomy
term and post types using query_posts the post type is getting ignored on
line 2034 of query.php ( $post_type = 'any'; ).
Not sure where to start with fixing it or if this intended?
[Edited rest of message]
This code however always ignores the post_type requirement but still
selects all post types linked to the term_name;
{{{
global $wp_query;
query_posts( array(
'post_type' => 'my_post_type' ,
"taxonomy_name" => "term_name",
'showposts' => 10 )
);
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13020>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list