[wp-trac] Re: [WordPress Trac] #8855: order=ASC shows all posts

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 14 11:09:37 GMT 2009


#8855: order=ASC shows all posts
-------------------------------+--------------------------------------------
 Reporter:  scribu             |        Owner:  anonymous
     Type:  defect (bug)       |       Status:  new      
 Priority:  normal             |    Milestone:  2.7.1    
Component:  General            |      Version:  2.7      
 Severity:  major              |   Resolution:           
 Keywords:  reporter-feedback  |  
-------------------------------+--------------------------------------------
Changes (by DD32):

  * keywords:  => reporter-feedback

Comment:

 If you're simply using "query_posts('order=ASC');" then yes, That returns
 all posts, query_posts() doesnt take into account current query vars, it
 completely rests it.

 You could use something like:
 {{{
 query_posts( array_merge($GLOBALS['wp_query']->query_vars, array('order'
 => 'ASC')) );
 }}}
 to achieve what you're after i think

 Has this changed from an earlier version of WP?

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


More information about the wp-trac mailing list