[wp-trac] [WordPress Trac] #34797: WP_Query orderby broken for menu_order when posts_per_page is set
WordPress Trac
noreply at wordpress.org
Thu Nov 26 23:33:33 UTC 2015
#34797: WP_Query orderby broken for menu_order when posts_per_page is set
--------------------------+-----------------------------
Reporter: dan.rossiter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 4.3.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Passing the following arguments to WP_Query results in a seemingly
arbitrary ordering. Definitely not the menu order.
[posts_per_page] => 16,
[offset] => 0,
[orderby] => menu_order,
[order] => ASC,
[post_status] => any,
[post_type] => attachment,
[post_mime_type] => application,video,text,audio,image,
[suppress_filters] => 1,
[post_parent] => null
Settings posts_per_page to `-1` gets you the full list in the correct
order.
This has been broken since at least 4.3.x.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34797>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list