[wp-hackers] Limiting The Number of Sticky Posts That Are Shown

Michael E. Hancock justmichaelh at gmail.com
Sun Nov 30 01:52:15 GMT 2008

From: "Chris Thomson" <chris24 at chris24.ca>
It seems like when I add the showposts=1 parameter, it's ignored, and  
displays all sticky posts. Anyone know of a way to limit the number of  
sticky posts shown (to just one)?

How about the first stick post

 $sticky=get_option('sticky_posts') ;
  query_posts('p=' . $sticky[0]);


More information about the wp-hackers mailing list