WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12376 closed defect (bug) (worksforme)

WPQuery ORDER ASC fails

Reported by: sroucheray Owned by: ryan
Milestone: Priority: normal
Severity: normal Version: 2.9.2
Component: Query Keywords: reporter-feedback
Focuses: Cc:

Description

This code returns all my pages (tried with a number of 5 and 6 pages) :

$my_query = new WP_Query( array('order' => 'DESC', 'post_type' => 'page', 'orderby'=>'menu_order') );

while this one returns only the fourth firsts (the only change is the order) :

$my_query = new WP_Query( array('order' => 'ASC', 'post_type' => 'page', 'orderby'=>'menu_order') );

Change History (4)

comment:1 sroucheray4 years ago

  • Summary changed from WPQuery to WPQuery ORDER ASC fails

comment:2 Denis-de-Bernardy4 years ago

  • Component changed from General to Query
  • Milestone changed from 2.9.3 to 3.0
  • Owner set to ryan

comment:3 dd324 years ago

  • Keywords reporter-feedback added

are you running any plugins?

Can you post $my_Query->request ? (The SQL its using)

I am not seeing your reported issue, both return my 5 pages.

comment:4 dd324 years ago

  • Milestone 3.0 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

closing as worksforme pending reporter feedback.

If anyone else has a similar problem, please re-open with more details.

Note: See TracTickets for help on using tickets.