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.








Thanks, super-handy & works easily.
Thanks it works..
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
You pasted the code in a wrong place. Here is an article that you should consider before pasting any code from any website:
http://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/
You will have to use FTP to fix it.
Added the code to my functions.php to enable excerpts on my pages.
Worked perfectly, first time – thanks.
W.
Thank you for posting. Great Code.
A very handy function. Thanks for posting!
Brilliant, thank you
no need any plugins… just place this
add_post_type_support( 'page', 'excerpt' );
to your functions.phpThanks for adding this code. We will update the post soon.