Make WordPress Core


Ignore:
Timestamp:
08/05/2012 10:27:22 PM (14 years ago)
Author:
lancewillett
Message:

Twenty Twelve: only show excerpt on search view, not full content.

Props bradthomas127 and obenland. See #21462.

File:
1 edited

Legend:

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

    r21263 r21437  
    3131                </header><!-- .entry-header -->
    3232
     33                <?php if ( is_search() ) : // Only display Excerpts for Search ?>
     34                <div class="entry-summary">
     35                        <?php the_excerpt(); ?>
     36                </div><!-- .entry-summary -->
     37                <?php else : ?>
    3338                <div class="entry-content">
    3439                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
    3540                        <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    3641                </div><!-- .entry-content -->
     42                <?php endif; ?>
    3743
    3844                <footer class="entry-meta">
Note: See TracChangeset for help on using the changeset viewer.