Make WordPress Core

Changeset 21437


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

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

Props bradthomas127 and obenland. See #21462.

Location:
trunk/wp-content/themes/twentytwelve
Files:
3 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">
  • trunk/wp-content/themes/twentytwelve/rtl.css

    r21434 r21437  
    208208        text-align: right;
    209209    }
    210     .entry-content p {
     210    .entry-content p,
     211    .entry-summary p {
    211212        text-align: right;
    212213    }
  • trunk/wp-content/themes/twentytwelve/style.css

    r21436 r21437  
    763763}
    764764.entry-content p,
     765.entry-summary p,
    765766.comment-content p {
    766767    margin: 0 0 24px;
     
    13261327/* Minimum width of 600 pixels. */
    13271328@media screen and (min-width: 600px) {
    1328     .entry-content p {
     1329    .entry-content p,
     1330    .entry-summary p {
    13291331        text-align: left;
    13301332        text-justify: auto;
Note: See TracChangeset for help on using the changeset viewer.