Make WordPress Core

Ticket #22089: excerpt-if-present.diff

File excerpt-if-present.diff, 796 bytes (added by kwight, 12 years ago)
  • wp-content/themes/twentytwelve/content.php

     
    3636                </div><!-- .entry-summary -->
    3737                <?php else : ?>
    3838                <div class="entry-content">
     39                        <?php if ( has_excerpt() && ! is_singular() ) : // Display excerpt only if present ?>
     40                        <?php the_excerpt(); ?>
     41                        <?php else : ?>
    3942                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
     43                        <?php endif; ?>
    4044                        <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    4145                </div><!-- .entry-content -->
    4246                <?php endif; ?>