How to Control Post Excerpts and the 'Continue Reading' Link in Twenty Fourteen
Content
Many users of the Twenty Fourteen theme encounter a common challenge: controlling how their posts are displayed on archive pages like the homepage, category listings, and search results. By default, the theme's behavior can be inconsistent, sometimes showing full posts, sometimes excerpts, and a 'Continue Reading' link that may not always suit your needs. This guide explains why this happens and provides the most effective solutions.
The Core Issue: Understanding Twenty Fourteen's Display Logic
The Twenty Fourteen theme does not have a built-in setting to globally switch between full posts and excerpts. Its display logic is hard-coded into its template files. The content.php file uses a conditional statement to check the page context. By default, it shows a full excerpt only on search results pages (is_search()), while showing the full post content on other pages like the homepage and archives.
Common Symptoms and Solutions
1. Showing Full Posts Instead of Excerpts
Problem: Your homepage, category, or archive pages display the entire content of your posts instead of a short summary.
Solution: The most common and robust fix is to modify the conditional statement in your theme's templates. This must be done in a child theme to preserve your changes after theme updates.
- In your child theme, copy the
content.phpfile from the parent Twenty Fourteen theme. - Locate this code block:
<?php if ( is_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">→</span>', 'twentyfourteen' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> - Change the first condition to control where excerpts appear. For example, to show excerpts on the homepage, archive pages, and search results, change
if ( is_search() ) :to:<?php if ( is_search() || is_home() || is_archive() ) : ?>
Note: If you use custom post formats (like video, audio, etc.), you may need to apply similar changes to their specific template files (e.g., content-video.php).
2. Changing the "Continue Reading" Text
Problem: The 'Continue Reading' link is in English and you need to translate it or change its text.
Solution: As of Twenty Fourteen version 1.3, the theme uses its own function to generate this link, which overrides the standard WordPress filter. To customize it, add the following code to your child theme's functions.php file:
function my_child_theme_excerpt_more( $more ) {
return ' <a class="more-link" href="' . get_permalink( get_the_ID() ) . '">' . __( 'Your Custom Text Here', 'your-child-theme-text-domain' ) . ' <span class="meta-nav">→</span></a>';
}
add_filter( 'excerpt_more', 'my_child_theme_excerpt_more', 999 );
Replace Your Custom Text Here with your desired text or translation. The high priority (999) helps ensure this function runs after the theme's function.
3. HTML Tags Breaking Layout in Excerpts
Problem: When a post excerpt is automatically generated from content containing HTML (like bold or italic tags), the closing tag can be cut off, causing the rest of the page to display incorrectly.
Solution: This is a known downside of automated excerpts. The most reliable fix is to manually create excerpts for your posts using the 'Excerpt' field in the WordPress post editor. This gives you full control over the summary text and ensures no broken HTML is output. Alternatively, you can use the <!--more--> tag within your post content to define exactly where the teaser text should end.
Alternative: Using a Plugin
If editing theme files is not an option, several community members have reported success using plugins like Auto Limit Posts Reloaded to control post output on archive pages. This can be a quicker, albeit less customizable, solution.
Important Recommendation
Always use a child theme when making changes to any theme's template files (.php) or functions. This protects your modifications from being overwritten when the parent theme receives an update.
Related Support Threads Support
-
Continue reading in my own languagehttps://wordpress.org/support/topic/continue-reading-in-my-own-language/
-
Problem with excerptshttps://wordpress.org/support/topic/problem-with-excerpts-4/
-
Excerpt Link & CSS rendering of the page contenthttps://wordpress.org/support/topic/excerpt-link-css-rendering-of-the-page-content/
-
plugin to have post excerpt on home pagehttps://wordpress.org/support/topic/plugin-to-have-post-excerpt-on-home-page/
-
"Switch blog feed to show excerpts" Not working properlyhttps://wordpress.org/support/topic/switch-blog-feed-to-show-excerpts-not-working-properly/
-
read morehttps://wordpress.org/support/topic/read-more-112/
-
How to make posts to show in summary on frontpage feed?https://wordpress.org/support/topic/how-to-make-posts-to-show-in-summary-on-frontpage-feed/
-
Excerpts not appearing on front pagehttps://wordpress.org/support/topic/excerpts-not-appearing-on-front-page/
-
Index issuehttps://wordpress.org/support/topic/index-issue-2/
-
How To Make My Blog Entries Into Excerpts With Photo In Circlehttps://wordpress.org/support/topic/how-to-make-my-blog-entries-into-excerpts-with-photo-in-circle/
-
Full length text showing on landing pagehttps://wordpress.org/support/topic/full-length-text-showing-on-landing-page/
-
Contribution in short formhttps://wordpress.org/support/topic/contribution-in-short-form/
-
Help displaying excerptshttps://wordpress.org/support/topic/help-displaying-exerpts/
-
Problems with excerptshttps://wordpress.org/support/topic/problems-with-excerpts-2/
-
Change text of Continue Readinghttps://wordpress.org/support/topic/change-text-of-continue-reading/
-
Excerpts Instead of Whole Posthttps://wordpress.org/support/topic/excerpts-instead-of-whole-post/
-
Show excerpts on category-pages with video post typehttps://wordpress.org/support/topic/show-excerpts-on-category-pages-with-video-post-type/
-
excerpt_read_more_link($output) only works for index.phphttps://wordpress.org/support/topic/excerpt_read_more_linkoutput-only-works-for-indexphp/
-
Number of Posts displayedhttps://wordpress.org/support/topic/number-of-posts-displayed-3/
-
Use "Read more"-tag in text editor?https://wordpress.org/support/topic/use-read-more-tag-in-text-editor/
-
function twentyfourteen_excerpt_more stops excerpt_more workinghttps://wordpress.org/support/topic/function-twentyfourteen_excerpt_more-stops-excerpt_more-working/
-
Don't show excerpt in search pagehttps://wordpress.org/support/topic/dont-show-excerpt-in-search-page/