Sticky Posts are not ordered correctly after selection
|Reported by:||beaulebens||Owned by:||ryan|
In WP_Query, sticky posts are added/moved to the top of the posts array after everything else is selected and ordered according to the query parameters.
Sticky posts are loaded as a list of post_IDs from the database, according to the order they were marked as sticky.
Sticky posts that were not originally part of the returned posts are queried and added into the collection of sticky posts separately.
None of the handling of sticky posts, or the handling of the entire post array after stickies are added, is date ordered by date/title/whatever was requested.
Stickies need to be loaded/extracted into a separate array, ordered (independently) according to the original query, then added to the top of the post array.
Change History (11)
comment:4 wonderboymusic — 9 months ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 3.7