[wp-trac] [WordPress Trac] #25246: Make WP_Query (pagination) to load after template is loaded

WordPress Trac noreply at wordpress.org
Sat Sep 7 00:01:52 UTC 2013


#25246: Make WP_Query (pagination) to load after template is loaded
--------------------------+------------------------------
 Reporter:  alexvorn2     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  close         |
--------------------------+------------------------------
Changes (by johnbillion):

 * keywords:   => close


Comment:

 If you're doing a `new WP_Query()` within the page then that query is
 unrelated to the URL of the page you're on. The two are not and should not
 be connected. The 404 you get from your example is generated by the main
 query, which is separate from your secondary query.

 The `pre_get_posts` filter is what you need here.

 Suggesting close as invalid.

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


More information about the wp-trac mailing list