[wp-trac] [WordPress Trac] #13150: get_posts( post_type=x & custom_tax=y ) ignores the custom post type

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 27 17:54:34 UTC 2010


#13150: get_posts( post_type=x & custom_tax=y ) ignores the custom post type
--------------------------+-------------------------------------------------
 Reporter:  bobsoap       |       Owner:                                   
     Type:  defect (bug)  |      Status:  new                              
 Priority:  high          |   Milestone:  3.0                              
Component:  Post Types    |     Version:  3.0                              
 Severity:  major         |    Keywords:  custom post type, custom taxonomy
--------------------------+-------------------------------------------------

Comment(by michaelh):

 Maybe it is this 'status=publish'

 This works for me
 {{{
 <?php
 $args=array(
   'post_type' => 'book',
   'writer' => 'John',
   'post_status' => 'publish',
   'posts_per_page' => -1
     );
 $return=get_posts($args);
 echo "<pre>"; print_r($return); echo "</pre>";
 ?>
 }}}

 If that doesn't resolve it, also there was ticket:13020 last week -- have
 you updated to the latest nightly?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13150#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list