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: https://develop.svn.wordpress.org/trunk@18218 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ian Stewart 2011-06-09 16:53:01 +00:00
parent 96f37320b1
commit b1f4cb3788
1 changed files with 4 additions and 0 deletions

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">