[wp-trac] [WordPress Trac] #9978: Sticky Posts are not ordered
correctly after selection
WordPress Trac
wp-trac at lists.automattic.com
Fri May 29 23:14:06 GMT 2009
#9978: Sticky Posts are not ordered correctly after selection
--------------------------+-------------------------------------------------
Reporter: beaulebens | Owner: ryan
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version: 2.8
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9978>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list