WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#21462 closed enhancement (fixed)

Twenty Twelve: Show excerpt on search result page.

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

Description

Think it would be better to just show the excerpt when the search result page is being displayed.

<?php if ( is_search() ) : // Display Excerpts for Search ?>
<div class="entry-summary">
	<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
	<div class="entry-content">
		<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
		<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
	</div><!-- .entry-content -->
<?php endif; ?>

Attachments (1)

21462.diff (1.3 KB) - added by obenland 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 follow-up: @SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.5

comment:2 in reply to: ↑ 1 @lancewillett3 years ago

  • Milestone changed from 3.5 to Awaiting Review

Replying to SergeyBiryukov:

I think it's OK to leave these as Awaiting Review until they are reviewed.

comment:3 @lancewillett3 years ago

  • Milestone changed from Awaiting Review to 3.5

Chatting at dev day with drewstrojny and iandstewart -- we agree this is a good change. And this is in Twenty Eleven also so makes sense to be consistent there.

@obenland3 years ago

comment:4 @obenland3 years ago

21462.diff adds markup and style

comment:5 follow-up: @bradthomas1273 years ago

What do you think about on the post formats link, quote, image, and aside?
I don't think image would need it.

Last edited 3 years ago by bradthomas127 (previous) (diff)

comment:6 in reply to: ↑ 5 @lancewillett3 years ago

Replying to bradthomas127:

What do you think about on the post formats link, quote, image, and aside?
I don't think image would need it.

Good point – they might not need it if they are short format anyway.

comment:7 @lancewillett3 years ago

In [21437]:

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

Props bradthomas127 and obenland. See #21462.

comment:8 @lancewillett3 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.