SysTutorials

WordPress Twenty Thirteen: Using Excerpts on Archive Pages

WordPress Twenty Thirteen theme shows full post content on archive pages by default. Using excerpts instead keeps archive pages clean and improves page load speed by showing just a summary of each post.

Enable Excerpts on Archive Pages

Add this to your theme’s functions.php or a custom plugin:

function twentythirteen_excerpts_on_archives($content) {
    if (is_archive() || is_home()) {
        return the_excerpt();
    }
    return $content;
}
add_filter('the_content', 'twentythirteen_excerpts_on_archives');

Or modify the archive template directly. Edit archive.php and replace the_content() with the_excerpt():

// In archive.php, find:
<?php the_content(); ?>

// Replace with:
<?php the_excerpt(); ?>

Custom Excerpt Length

Control how many words the excerpt displays:

// Set excerpt length to 30 words
function custom_excerpt_length($length) {
    return 30;
}
add_filter('excerpt_length', 'custom_excerpt_length');

// Change the [...] to a read more link
function custom_excerpt_more($more) {
    return '... <a href="' . get_permalink() . '">Continue reading →</a>';
}
add_filter('excerpt_more', 'custom_excerpt_more');

Manual Excerpts

WordPress supports two types of excerpts:

To enable the Excerpt meta box: Screen Options (top right of post editor) → check “Excerpt”. Write a hand-crafted summary for important posts.

Using the WordPress REST API

For headless WordPress setups, the REST API returns both rendered and plain text excerpts:

// GET /wp-json/wp/v2/posts
{
    "excerpt": {
        "rendered": "<p>Post summary text...</p>\n",
        "protected": false
    }
}

Use the excerpt.rendered field for display in your frontend application.

Excerpts vs Read More Tag

Two different approaches to truncating content:

For archive pages, excerpts are generally better because they’re consistent in length and don’t break layouts with unexpected HTML.

Display a thumbnail alongside each excerpt:

function excerpt_with_thumbnail() {
    if (has_post_thumbnail()) {
        echo '<div class="excerpt-thumb">';
        the_post_thumbnail('thumbnail');
        echo '</div>';
    }
    the_excerpt();
}

Style the thumbnail with CSS to float it left or right of the excerpt text.

Modern Theme Approaches (2026)

If you’re using a block theme (Full Site Editing), use the Query Loop block with Post Excerpt blocks instead of modifying PHP templates. The block editor provides built-in excerpt display options without code changes.

For classic themes still in use, the PHP approach above works on Twenty Thirteen and most other themes derived from it.

Performance Benefits of Excerpts

Using excerpts on archive pages significantly improves page load times. Full post content on archive pages means loading all images, embedded videos, and shortcodes for every post on the page. With 10 posts per page, that can mean loading dozens of images the user never scrolls to see.

Excerpts strip all HTML and media, resulting in much smaller page sizes. For a site with 1,000+ posts, the bandwidth savings are substantial. Users on mobile connections particularly benefit from the reduced data transfer.

Excerpts also improve SEO by reducing duplicate content. When full posts appear on both the single post page and archive pages, search engines may see this as duplicate content. Excerpts provide unique text on each page type, helping search engines understand the purpose of each page.

Plugin Alternatives

Several WordPress plugins handle excerpt management without editing theme files:

For sites that cannot modify theme files, a plugin is the safer approach that survives theme updates.

← All posts