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

WordPress Trac noreply at wordpress.org
Fri Sep 6 23:24:14 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        |   Keywords:
--------------------------+-----------------------------
 The problem is that the pagination is calculated before the template is
 loaded, so sometimes the `page/2` does not contain the posts requested or
 does not display the posts at all.

 On other hand this will help to load multiple posts types on the main
 query with not breaking the pagination, adjust number of posts per page
 depending on custom posts type or main post type - on different archive
 pages:

 Ex: on category.php page to display only 5 posts at most but on index.php
 - 20 posts at most.

 Of course we can use some custom actions that will change the value of the
 `pre_get_posts` but my ticket is for modification of the WP_Query itself
 so the pagination will be calculated like on Page Templates does.

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


More information about the wp-trac mailing list