GeneratePress Excerpt Length Fix for Free Version

Blog Champs is reader-supported. By following through with a purchase, I may earn a commission at no expense to you. Thank you for your support.

GeneratePress Excerpt Length Fix for Free Version

Are you trying to set the excerpt length in GeneratePress without paying for premium?

Because I was having trouble with this myself, I figured I'd post the solution.

If the excerpt in GeneratePress Free isn't cooperating with you, you'll need to add some PHP to your functions.php file in the GeneratePress theme.

I actually found the PHP snippet in GeneratePress' own documentation, but it doesn't tell you exactly how to use it. This isn't completely helpful for newbies.

So here's my quick little guide on setting the excerpt length for GP FREE:

Setting Excerpt Length in GeneratePress

1. From the WordPress dashboard, navigate to Appearance > Theme Editor.

GeneratePress Excerpt Length Fix for Free Version | generatepress free excerpt length how
GeneratePress excerpt length PHP code

2. Add the following code on line 10.

add_filter( 'generate_show_excerpt', function( $show ) {
    if ( 'standard' !== get_post_format() && ! $show ) {
        return true;
    return $show;
} );

3. Scroll down and click Update File.

And that's it! Check to see if everything is working correctly. If you're still having trouble, post your website below in the comments for help.

And be sure to check out my Sticky Header CSS tutorial for 6 free sticky header solutions.

Thank you.

Photo of author

About the Author

Forced out of Colorado because of the housing market, Kyle now writes WordPress guides out of his Florida apartment, hoping one day to return to the mountains from which he came.
Why I Left SiteGround and How I Found My Next Hosting Provider

After many years with SiteGround, I finally made the switch, and I'm glad I did. Read the full story here.

Leave a Comment