From ff1a97a7fcc521bc1348f8cbb9de12d6e9e470fb Mon Sep 17 00:00:00 2001 From: iandstewart Date: Thu, 9 Jun 2011 16:39:40 +0000 Subject: [PATCH] Twenty Eleven: make sure we're checking for sticky posts at the correct time in showcase.php git-svn-id: http://svn.automattic.com/wordpress/trunk@18216 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyeleven/showcase.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-content/themes/twentyeleven/showcase.php b/wp-content/themes/twentyeleven/showcase.php index 9db191e015..a31b5a33f2 100644 --- a/wp-content/themes/twentyeleven/showcase.php +++ b/wp-content/themes/twentyeleven/showcase.php @@ -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.