Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

Add Excerpts to Your Pages in WordPress

Last updated on by
Follow WPBeginner on YouTube
Add Excerpts to Your Pages in WordPress

In WordPress excerpts seem to be a feature exclusively for posts. But some users might want to use it for Pages as well. Even though WordPress supports Page excerpts internally as it has the same database field as the post excerpts, it provides no option to add excerpts to pages through the WordPress admin panel. In this article we will share a plugin that adds an excerpt box for your pages similar to the one for your posts.

Open your theme’s functions.php file and add the following code:

add_action( 'init', 'my_add_excerpts_to_pages' );
function my_add_excerpts_to_pages() {
     add_post_type_support( 'page', 'excerpt' );
}

Alternatively, you can install a plugin called PJW Page Excerpt which will add the same excerpt box to your page editor like your post editor has.

Add Excerpts to Your Pages in WordPress

PJW Page Excerpt


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Real name

    Tank’s

    codex.wordpress.org/Function_Reference/add_post_type_support#Example

  • Julio

    Thanks! worked perfectly

  • Dave Andrew

    Worked a treat. Thanks for the post.

  • Owen

    Thanks your sharing :)

  • Lins

    Thanks, super-handy & works easily. :)

  • syndrael

    Thanks it works..

  • Alastair Barnett

    Hello,

    I posted the above code to my functions php. I now cannot access my website. Here is the message I receive:Parse error: syntax error, unexpected T_FUNCTION in /home/content/94/8738594/html/wp-content/themes/associate/functions.php on line 82

    Please tell me how I can access my website in order to delete this code. Thanks if you can help. I’ve just lost my website and in a bit of a panic. Website address: http://www.thewritingbutler.com
    AB

  • WK

    Added the code to my functions.php to enable excerpts on my pages.

    Worked perfectly, first time – thanks.

    W.

  • mebhuwan

    Thank you for posting. Great Code. :)

  • http://burningfiredesign.com mattrock

    A very handy function. Thanks for posting!

  • DanS

    Brilliant, thank you

  • http://softboxkid.com softboxkid

    no need any plugins… just place this add_post_type_support( 'page', 'excerpt' );
    to your functions.php

    • http://www.wpbeginner.com Editorial Staff

      Thanks for adding this code. We will update the post soon.