/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* Get all sticky posts */ $sticky = get_option( 'sticky_posts' ); /* Sort the stickies with the newest ones at the top */ /* Get the 2 newest stickies (change 2 for a different number) */ /* Query sticky posts */ ?>
URL: http://justintadlock.com/archives/2009/03/28/get-the-latest-sticky-posts-in-wordpress
Comments
