[wp-trac] [WordPress Trac] #22089: Twenty Twelve: Allow excerpts, if present, on index pages

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 3 21:17:17 UTC 2012


#22089: Twenty Twelve: Allow excerpts, if present, on index pages
-----------------------------+------------------------------
 Reporter:  kwight           |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Bundled Theme    |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |
-----------------------------+------------------------------
Changes (by DrewAPicture):

 * keywords:  has-patch => has-patch close


Comment:

 -1 for this.

 The manual excerpt is meant to override the generated one and should only
 be displayed when `the_excerpt()` is called in the template.

 But if you really want it in your child theme, you could just test for it
 in the loop and override `the_content()`. something like this:
 {{{
 if ( get_post_field( 'post_excerpt', $post->ID ) ) {
         the_excerpt();
 } else {
         the_content();
 }

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22089#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list