[wp-trac] [WordPress Trac] #46294: wp rest api fails to paginate page requests correctly when ordering on menu_order

WordPress Trac noreply at wordpress.org
Tue Jun 25 20:19:20 UTC 2019


#46294: wp rest api fails to paginate page requests correctly when ordering on
menu_order
--------------------------+------------------------------
 Reporter:  hobzhobz      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  rest-api
--------------------------+------------------------------

Comment (by hobzhobz):

 Replying to [comment:6 TimothyBlynJacobs]:
 > This seems like a bug in the query component. I’d think paginating over
 a `new WP_Query([ 'orderby' => 'menu_order' ])` should work as expected.

 I agree. Wp_query should automatically append order by id asc or something
 when the original order by clause contains only non-unique fields

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


More information about the wp-trac mailing list