WordPress.org

Make WordPress Core

#22089 closed enhancement (wontfix)

Twenty Twelve: Allow excerpts, if present, on index pages

Reported by: kwight Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

It is possible for users to enter and save excerpts for posts, yet never see them because of the theme's sole use of the_content() for index pages (blog, archives). This is confusing at best, and frustrating at worst, for users wanting to take advantage of crafted excerpts to represent their posts.

By conditionally using the_excerpt() when an excerpt is present, users gain control, on a post-by-post basis, of their summaries. Simply using the <!--more--> tag is not sufficient as it only provides a cut-off point in the content, rather than allowing custom excerpts.

Attachments (1)

excerpt-if-present.diff (796 bytes) - added by kwight 19 months ago.

Download all attachments as: .zip

Change History (7)

kwight19 months ago

comment:1 helenyhou19 months ago

  • Summary changed from Allow excerpts, if present, on index pages to Twenty Twelve: Allow excerpts, if present, on index pages

comment:2 lancewillett19 months ago

I vote to not change this behavior.

With Twenty Twelve we are continuing the same behavior used in two previous default themes, Twenty Ten and Twenty Eleven, which is to only show excerpts on the search results view (and also on archives in the case of Ten).

comment:3 DrewAPicture19 months ago

  • Keywords close added

-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();
}
Version 0, edited 19 months ago by DrewAPicture (next)

comment:4 follow-up: kwight19 months ago

I guess I just don't see it as expected, or even desired behaviour, particularly to any new user that hasn't been using the older default themes. It feels like we're hoping users will think it's the "short description for search results" section.

Hm, maybe what I really want is a filter for the Excerpt meta box description, so users know what they get when entering an excerpt. Of the five example uses in the Codex, Twenty Twelve only implements one (albeit the first one).

Thanks for considering.

comment:5 in reply to: ↑ 4 SergeyBiryukov19 months ago

Replying to kwight:

Hm, maybe what I really want is a filter for the Excerpt meta box description, so users know what they get when entering an excerpt.

'gettext' filter could be used for that:
http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext

comment:6 lancewillett18 months ago

  • Keywords has-patch close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closing as wontfix after discussing with other developers in #wordpress-dev today (log).

Note: See TracTickets for help on using tickets.