Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#61048 new enhancement

order sticky posts using the same order for posts

Reported by: vladimir173's profile vladimir173 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 6.5
Component: Query Keywords:
Focuses: Cc:

Description

Currently sticky posts are shown unordered.

I suggest the following code amendments in includes/class-wp-query.php to order sticky posts in the same way as the regular posts ordered.

3509c3509,3511
<                                               'lazy_load_term_meta'    => $q['lazy_load_term_meta']
---
>                                               'lazy_load_term_meta'    => $q['lazy_load_term_meta'],
>                                               'order'                  => $q['order'],
>                                               'orderby'                => $q['orderby']

Attachments (1)

class-wp-query.php.diff (216 bytes) - added by vladimir173 2 months ago.
proposed patch

Download all attachments as: .zip

Change History (2)

@vladimir173
2 months ago

proposed patch

#1 @surferking
2 months ago

+1 for this.

It might be that we would want Sticky and non-Sticky to have the same sorting, or their own independent sorting (Manual/Alphabetic/Date etc), so hooks to allow for this would be ideal.

Note: See TracTickets for help on using tickets.