Opened 9 years ago
Closed 9 years ago
#34797 closed defect (bug) (invalid)
WP_Query orderby broken for menu_order when posts_per_page is set
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
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.
Change History (1)
Note: See
TracTickets for help on using
tickets.
See Slack discussion: https://wordpress.slack.com/archives/meta/p1448577626000264