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

Chris Thomson chris24 at chris24.ca
Sat Nov 29 22:39:03 GMT 2008

Hey all,

I came across this PHP snippet for displaying sticky posts:
> query_posts(array('post__in'=>get_option('sticky_posts')));

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)?

Chris Thomson

More information about the wp-hackers mailing list