[wp-trac] Re: [WordPress Trac] #7457: Sticky Posts

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 3 07:25:39 GMT 2008


#7457: Sticky Posts
----------------------------------+-----------------------------------------
 Reporter:  ryan                  |        Owner:  anonymous
     Type:  defect                |       Status:  new      
 Priority:  normal                |    Milestone:  2.7      
Component:  General               |      Version:           
 Severity:  normal                |   Resolution:           
 Keywords:  sticky posts blessed  |  
----------------------------------+-----------------------------------------
Comment (by DD32):

 > Counting stickies towards the page limit and showing stickies on pages
 other than home could be cans of worms. Should we bother?

 I see what you mean..

 Could the menu_order field be utilised to mark a post as a sticky? It'd
 also mean that the paging support should work as expected.

 AFAIK, the menu_order field is not used by posts at all, Setting it to a
 >0 value for stickie would allow for the SQL ORDER BY to return Stickies
 first, followed by non-stickies (menu_order == 0), the SQL LIMIT would
 then continue working for paging.

 The only real downside i can think of is an extra SQL Ordering, which
 could reduce performance, but i cant see it being any worse than an extra
 SQL to fetch any stickies. (Note: Theres no index on menu_order, it is
 however an int(11) though)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7457#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list