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:
parent
96f37320b1
commit
b1f4cb3788
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue