Make WordPress Core

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: danrossiter's profile dan.rossiter Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Query Keywords:
Focuses: Cc:


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
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version 4.3.1 deleted
Note: See TracTickets for help on using tickets.