Twenty Eleven: check for published posts on the showcase page to prevent trashed sticky posts from appearing in the featured post loop; Props kawauso

git-svn-id: http://svn.automattic.com/wordpress/trunk@18218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
iandstewart 2011-06-09 16:53:01 +00:00
parent 8fb8077944
commit 6d99619150

View File

@ -53,6 +53,9 @@ get_header(); ?>
// The Featured Posts query.
$featured = new WP_Query( $featured_args );
// Proceed only if published posts exist
if ( $featured->have_posts() ) :
/**
* We will need to count featured posts starting from zero
@ -151,6 +154,7 @@ get_header(); ?>
</nav>
<?php endif; // End check for more than one sticky post. ?>
</div><!-- .featured-posts -->
<?php endif; // End check for published posts. ?>
<?php endif; // End check for sticky posts. ?>
<section class="recent-posts">