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 experts 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 »

Comments

  1. ctgirl says:

    The code worked for me. Added it to functions.php, and the Excerpt field became available in Screen options. Thanks so much!

  2. kapil says:

    around 15 days ago, same above code work perfectly for me, but now it is not working, what may be the problem, can anyone help me ? above code doesn’t show excerpt place in admin panel for new website that I am developing right now.

  3. João G. says:

    That’s amazing! I got a job to change the layout of a website which is running on WP and I would have to search for a function to get the content with “strip_tags” and reduce characters, but after “googling”, found your post. Great !!

  4. Real name says:

    Tank’s

    codex.wordpress.org/Function_Reference/add_post_type_support#Example

  5. Julio says:

    Thanks! worked perfectly

  6. Dave Andrew says:

    Worked a treat. Thanks for the post.

  7. Owen says:

    Thanks your sharing :)

  8. Lins says:

    Thanks, super-handy & works easily. :)

  9. syndrael says:

    Thanks it works..

  10. Alastair Barnett says:

    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

  11. WK says:

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

    Worked perfectly, first time – thanks.

    W.

  12. mebhuwan says:

    Thank you for posting. Great Code. :)

  13. mattrock says:

    A very handy function. Thanks for posting!

  14. DanS says:

    Brilliant, thank you

  15. softboxkid says:

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

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.