Twenty Eleven: make sure we're checking for sticky posts at the correct time in showcase.php

git-svn-id: https://develop.svn.wordpress.org/trunk@18216 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ian Stewart 2011-06-09 16:39:40 +00:00
parent e43bef6cc4
commit 4fcb4098fe

View File

@ -41,6 +41,10 @@ get_header(); ?>
* We limit the featured posts at ten.
*/
$sticky = get_option( 'sticky_posts' );
// Proceed only if sticky posts exist.
if ( ! empty( $sticky ) ) :
$featured_args = array(
'post__in' => $sticky,
'post_status' => 'publish',
@ -50,9 +54,6 @@ get_header(); ?>
// The Featured Posts query.
$featured = new WP_Query( $featured_args );
// Proceed only if sticky posts exist.
if ( $featured->have_posts() ) :
/**
* We will need to count featured posts starting from zero
* to create the slider navigation.