Display Sticky Posts in One Area

Display Sticky Posts in One Area

You can change the number 5 the amount of posts you want to show in your page. You can also display full posts by changing ‘the_excerpt’ value to ‘the_content’.

< ?php $sticky = get_option(‘sticky_posts’); rsort( $sticky ); $sticky = array_slice( $sticky, 0, 5); query_posts( array( ‘post__in’ => $sticky, ‘caller_get_posts’ => 1 ) );

if (have_posts()) :

while (have_posts()) : the_post();

the_title();

the_excerpt();

endwhile;

endif;

?>