Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#46348 closed defect (bug) (invalid)

WP query order parameter does not default to DESC

Reported by: skandha's profile skandha Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Query Keywords:
Focuses: Cc:

Description

Since the WordPress 5.1 update the WP query => order by parameter does not seem to default to 'DESC'. As a result all the posts are displayed in ascending order in terms of date where as it was showing latest posts first before WordPress Update to 5.1.

Change History (4)

#1 @skandha
6 years ago

  • Summary changed from WP query order by parameter does not default to DESC to WP query order parameter does not default to DESC

I meant order parameter and not order by.

#2 @swissspidy
6 years ago

  • Keywords reporter-feedback added
  • Severity changed from critical to normal

Hi there and welcome to Trac!

Looking at the source code at https://core.trac.wordpress.org/browser/tags/5.1/src/wp-includes/class-wp-query.php#L1654, I still see DESC as the default. Sounds like something else is causing this on your site.

Can you verify that this still happens on a clean install with no plugins active?

#3 @skandha
6 years ago

  • Resolution set to invalid
  • Status changed from new to closed

@swissspidy: Thank you for the follow up.
It seems to be due to order by => 'postin', empty postin used.
Sorry to have bothered you.

Thank you once again.

#4 @swissspidy
6 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.