Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34797 closed defect (bug) (invalid)

WP_Query orderby broken for menu_order when posts_per_page is set

Reported by: dan.rossiter Owned by:
Priority: normal Milestone:
Component: Query Version:
Severity: normal Keywords:
Cc: Focuses:

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)

#1 @pento
11 years ago

  • Milestone Awaiting Review
  • Resolutioninvalid
  • Status newclosed
  • Version 4.3.1
Note: See TracTickets for help on using tickets.