Featured image of post Ways to Personalize WordPress Excerpts Without Using Code

Ways to Personalize WordPress Excerpts Without Using Code

When you visit a WordPress website, you might notice that blog posts aren’t shown in their entirety on overview pages. Instead, you’ll often see a shortened version of the post content. This abbreviated version is called an excerpt. This guide will show you how to modify and personalize these WordPress post excerpts without needing to know any coding.

Here’s a visual example of how an excerpt looks on a blog page:

How to Customize WordPress Excerpts Without Code
How to Customize WordPress Excerpts

Why WordPress Themes Use Excerpts

There are several advantages to utilizing excerpts within WordPress themes:

  • Concise and Focused Home/Blog Pages: Your homepage or blog page remains streamlined, offering readers a brief overview of each post. Those who are interested in learning more can click through to the full article.
  • Clean and Uncluttered Design: Excerpts contribute to a visually appealing website by preventing overcrowding of content. Designers often refer to this as effectively utilizing “white space,” which is essential to a successful design. This is why most WordPress templates incorporate excerpts.

A Common Issue with WordPress Excerpts

Despite their widespread use, there’s a drawback to excerpts: the length of the excerpt, measured in characters or words, is often predetermined by the theme. A length that works well in one language might not be suitable for another. Issues also arise when page builders are used, as excerpts might display code snippets instead of clean text. This highlights the need for adjustable excerpt lengths.

Methods for Customizing Excerpts

Let’s explore four different ways to modify the length of your excerpts.

1. Using Custom Snippets in the WordPress Block Editor

WordPress makes it simple to add custom excerpts. Start by creating a new post create a new post an existing one.

On the right-hand side of your WordPress content editor, locate the “Extract” drop-down menu and click the down arrow.

How to Add Custom Snippets in WordPress (Default) Block Editor

This expands to reveal the “Statements” panel, where you can input your customized excerpt. For this illustration, we simply copied the first paragraph of our post.

Note: If you’re using the older Classic Editor, navigate to the “Screen Options” tab at the top right and check the “Excerpt” box. You’ll now find the excerpt box beneath the area where you write your post content.

expand to show the excerpt box. You can type your custom post excerpt here

Your WordPress theme will then use this custom excerpt for this specific post.

It’s worth noting that you might not see a “read more” link after the custom excerpt. Whether or not this link appears depends on the theme you’re using.

Readers can still access the full post by clicking on either the post title or the accompanying image.

2. Manual Excerpt Customization in the Classic Editor

WP screen options zoom
How to Customize WordPress Excerpts Without Code

There are two main categories of excerpts:

  • Automatic Excerpts: These are created by pulling content directly from your post. By default, automatic excerpts typically use the first 55 words of the post. We will later discuss how to adjust this word count.
  • Manual Excerpts: As the name suggests, these excerpts are manually entered by users when editing a post. You can find the manual excerpt box beneath the main editor, labeled as “Excerpt”, as illustrated in the screenshot below:
There are 2 types of a field on classic editor:
How to Customize WordPress Excerpts

The Importance of Manual Excerpts

Many WordPress users are unaware of or underutilize manual excerpts, which is a missed opportunity! Manual excerpts provide significant benefits:

  • Complete Control: You gain absolute control over the content that appears in your excerpt.
  • Enhanced SEO: Manual excerpts can boost your search engine optimization (SEO).

Speaking of SEO, certain SEO plugins, like Yoast SEO, will automatically pull the content from your manual excerpt and display it as the meta description in search engine results. Crafting a compelling manual excerpt can therefore increase your website’s click-through rate. Adding a manual excerpt is as simple as entering your desired text into the “Excerpt” box below the editor (refer to the screenshot above).

However, be aware that using a manual excerpt might cause the “read more” link to disappear. This behavior depends on the specific WordPress theme you’re using. It’s a common occurrence but not guaranteed. If maintaining the “read more” link is essential, sticking with the automatic excerpt might be preferable.

3. Adjusting Excerpt Length Through Code

If you’re comfortable working with code, customizing the excerpt length is straightforward. Access your theme’s functions.php file and add the following code snippet:

1
2
3
4
add_filter( 'excerpt_length', 'your_prefix_excerpt_length' );
function your_prefix_excerpt_length() {
    return 30;
}

Replace "30" with the desired number of words you’d like to display in your excerpts.

Important: When modifying code, it’s strongly recommended to utilize a child theme. This ensures that your customizations are not overwritten when your current WordPress theme is updated.

How to Customize WordPress grid shot content
How to Customize WordPress Excerpts

4. Utilizing WordPress Plugins for Excerpt Length Modification

The simplest and often the most user-friendly approach to changing excerpt lengths is by employing a WordPress plugin. We’ve explored various options, and here are three highly recommended plugins for this purpose.

CHANGE EXCERPT LENGTH

Developer: Ashkar

This plugin stands out for its simplicity. It adds just one straightforward option to your WordPress dashboard, under “Settings → Reading,” specifically for excerpt length. All you need to do is input your desired word count, and you’re all set!

CUSTOM EXCERPT LENGTH

Developer: The Krotek

Very similar to the previous plugin, this one also introduces an excerpt length option within the “Settings → Reading” section of your dashboard.

EXCERPT LENGTH

Developer: Lee Kelleher

This plugin offers a bit more flexibility, allowing you to customize not only the excerpt length but also the “read more” text. Like the other two plugins mentioned, this one is designed to be user-friendly and lightweight, so it won’t negatively impact your website’s loading speed. We’ve personally tested and implemented these plugins for some of our clients, and they function smoothly and effectively.

How to Customize WordPress Excerpts
How to Customize WordPress Excerpts
Licensed under CC BY-NC-SA 4.0