[wp-trac] [WordPress Trac] #27674: WP_Query auto-draft

WordPress Trac noreply at wordpress.org
Sun Apr 6 14:22:02 UTC 2014


#27674: WP_Query auto-draft
--------------------------+------------------------------
 Reporter:  Philo01       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  3.8.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by Philo01):

 The same goes for trying to query an attachment.

 {{{
 $attachment = new WP_Query( 'p=1&post_type=attachment&post_status=inherit'
 ); // 0 results
 $attachment = new WP_Query( 'post_type=attachment&post_status=inherit' );
 // 10 results
 }}}

 So it seems when is_single = true, the posts array is being reset.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27674#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list