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

Add Excerpts to Your Pages in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
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 »


  1. Manoj says:

    Thanks for the code .But if i don’t write content in excerpt section , Excerpt is not retrieving from editior .

  2. Amit kumar says:

    how to separate post excerpt in box

  3. Toure says:

    How can it be added to a page template?

  4. nad ray says:

    You should wrap the code in :

    …for it to work and not make your site break/display a blank page.

  5. Reza says:

    How can I add excerpts to the events? Can anyone please help?

    • nad ray says:

      I would use the same code, but change page to events (line 3). If that does not work you need to find your events custom post type name and enter it instead of pages.

  6. ctgirl says:

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

  7. 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.

  8. 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 !!

  9. Real name says:


  10. Julio says:

    Thanks! worked perfectly

  11. Dave Andrew says:

    Worked a treat. Thanks for the post.

  12. Owen says:

    Thanks your sharing :)

  13. Lins says:

    Thanks, super-handy & works easily. :)

  14. syndrael says:

    Thanks it works..

  15. Alastair Barnett says:


    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:

  16. WK says:

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

    Worked perfectly, first time – thanks.


  17. mebhuwan says:

    Thank you for posting. Great Code. :)

  18. mattrock says:

    A very handy function. Thanks for posting!

  19. DanS says:

    Brilliant, thank you

  20. softboxkid says:

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

    • Editorial Staff says:

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

    • ghimeray says:

      How to get this excerpt into the page?
      Tne Excerpt function is working well, but i’m not able to get the excerpt into the front page.

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.