• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Change Excerpt Size

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Change Excerpt Size

This topic is: resolved

Tagged: excerpts size, Sample Theme

  • This topic has 2 replies, 2 voices, and was last updated 13 years, 4 months ago by hanuman.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 8, 2013 at 5:03 pm #10486
    hanuman
    Member

    Hi,

     

    I'm using the Sample Child Theme and would simply like to change the excerpt size from 5 lines of text to 7 lines to match the 150px thumbnail size on the category archive page.

    In other words, how do I change the number of characters in the excerpt size?

    I know of the Advanced Excerpt plugin, but is that the  best way to do it?

     

    Cheers and TIA.

    January 9, 2013 at 1:29 am #10626
    Dan
    Participant

    Hey hanuman,

    This is the standard fix from the official code snippets (add to functions.php in the child theme)


    /** Modify the length of post excerpts */
    add_filter( 'excerpt_length', 'custom_excerpt_length' );
    function custom_excerpt_length($length) {
    return 50; // pull first 50 words
    }

    I guess you'd have to play with the number of words to get it spot on.

    Does that help?

    January 9, 2013 at 1:51 am #10627
    hanuman
    Member

    Hey Dan,

    That is exactly what I needed!

    Thank you kindly for your help, it's much appreciated.

     

    Cheers!

     

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Change Excerpt Size’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble