Add Excerpt Support for WordPress Pages

How to Add Excerpt Support for WordPress Pages

in Posts & pages
Google+ LinkedIn

By default WordPress does not allow excerpt to pages and it’s probably for good reason because normally you will never use it for pages. That’s why WordPress provides no option to add excerpts to pages through the WordPress admin panel but it’s fairly very easy to enable excerpt for pages too, similarly like posts.

To enable excerpt support for pages, you should copy and paste following code snippet in your theme’s functions.php file.

// add excerpt support for pages
function wcs_add_excerpt_support_pages() {
    add_post_type_support( 'page', 'excerpt' );
add_action( 'init', 'wcs_add_excerpt_support_pages' );

Share the love

If you like this snippet, share it with others!

Leave a Reply

Your email address will not be published. Required fields are marked *