Add excerpt settings to pages in WordPress using code

Add excerpt settings to pages in WordPress using code

This is a nice simple one-liner to enable excerpts in pages.

Add the following code to your functions.php and you are done.

add_post_type_support( 'page', 'excerpt' );