[wp-trac] [WordPress Trac] #13020: WP_Query - Post type ignored in taxonomy queries.
WordPress Trac
wp-trac at lists.automattic.com
Fri May 21 20:17:29 UTC 2010
#13020: WP_Query - Post type ignored in taxonomy queries.
--------------------------+-------------------------------------------------
Reporter: d910qf | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Post Types | Version: 3.0
Severity: normal | Keywords: has-patch, taxonomies, query
--------------------------+-------------------------------------------------
Comment(by michaelh):
With a post_type of 'book' and a custom taxonomy of 'genre', these query
arguments work fine for me:
{{{
$args=array(
'genre' => 'mystery',
'post_type' => 'book',
'post_status' => 'publish',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
}}}
and
{{{
$args=array(
'genre' => 'mystery',
'post_type' => 'book',
'post_status' => 'draft',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13020#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list