WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 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 4 years ago.

Download all attachments as: .zip

Change History (9)

#1 follow-up: @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 3.5

#2 in reply to: ↑ 1 @lancewillett
4 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.

#3 @lancewillett
4 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.

@obenland
4 years ago

#4 @obenland
4 years ago

21462.diff adds markup and style

#5 follow-up: @bradthomas127
4 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 4 years ago by bradthomas127 (previous) (diff)

#6 in reply to: ↑ 5 @lancewillett
4 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.

#7 @lancewillett
4 years ago

In [21437]:

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

Props bradthomas127 and obenland. See #21462.

#8 @lancewillett
4 years ago

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