To show post excerpts on my tags page, you will need to make changes in content.php
. By default content.php
uses post excerpts for search pages only but you can modify the default behavior.
This is how you can include tag pages to show post excerpts. Add || is_tag()
as follows:
<?php if ( is_search() || is_tag() ) : ?>
<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">→</span>', 'twentyfourteen' ) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<?php endif; ?>
If you want to use post excerpt for categories, tags and author pages then better use is_archive()
instead of is_tag()
in above code.