[wp-trac] [WordPress Trac] #28382: WP_Query - Main Query Flag

WordPress Trac noreply at wordpress.org
Wed May 28 18:34:59 UTC 2014


#28382: WP_Query - Main Query Flag
-------------------------+-----------------------
 Reporter:  Howdy_McGee  |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Query        |     Version:  3.9.1
 Severity:  normal       |  Resolution:  invalid
 Keywords:               |     Focuses:  template
-------------------------+-----------------------
Changes (by nacin):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 query_posts() is already there to replace the main query, exactly what
 you're requesting. It's just discouraged because "replacing" the main
 query causes lots of quirks. But also, by the time the template is run,
 the main query has already run — which means you're doing twice the work
 with absolutely no benefit.

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


More information about the wp-trac mailing list