[wp-trac] [WordPress Trac] #15995: query is separating post_type 'post' and from custom post_types

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 27 12:37:40 UTC 2010


#15995: query is separating post_type 'post' and from custom post_types
-------------------------+-------------------------------------------------
 Reporter:  bowstreet    |      Owner:
     Type:  defect       |     Status:  new
  (bug)                  |  Milestone:  Awaiting Review
 Priority:  normal       |    Version:  3.0.3
Component:  Post Types   |   Keywords:  query, sort, post_type, custom,
 Severity:  normal       |  post
-------------------------+-------------------------------------------------
 {{{
 query_posts(
         array( 'post_type' => array(
                 'post',
                 'custom_1',
                 'custom_2'
                 ),
         'orderby' => 'title',
         'order'=>'ASC' )
         );
 }}}

 It doesn't matter which parameter you take for 'orderby' it will separate
 the post_type 'post' from the custom post_types as shown in the example
 below:

 custom_1,       title = AAA[[BR]]
 custom_2,       title = DDD[[BR]]
 custom_1,       title = GGG[[BR]]
 post,           title = BBB[[BR]]
 post,           title = EEE[[BR]]

 I cannot believe that this is intended. The proper output should to be:

 custom_1,       title = AAA[[BR]]
 post,           title = BBB[[BR]]
 custom_2,       title = DDD[[BR]]
 post,           title = EEE[[BR]]
 custom_1,       title = GGG[[BR]]

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15995>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list