Make WordPress Core

Changeset 18218


Ignore:
Timestamp:
06/09/2011 04:53:01 PM (15 years ago)
Author:
iandstewart
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/showcase.php

    r18216 r18218  
    5454                    // The Featured Posts query.
    5555                    $featured = new WP_Query( $featured_args );
     56                   
     57                    // Proceed only if published posts exist
     58                    if ( $featured->have_posts() ) :
    5659
    5760                    /**
     
    152155                <?php endif; // End check for more than one sticky post. ?>
    153156                </div><!-- .featured-posts -->
     157                <?php endif; // End check for published posts. ?>
    154158                <?php endif; // End check for sticky posts. ?>
    155159
Note: See TracChangeset for help on using the changeset viewer.