How to add excerpt support for WordPress pages

Adding a custom excerpt in WordPress posts is easy – when you’re editing a post, you can turn on the excerpt metabox in screen options and away you go. But that option is not available when you’re editing pages. Thankfully, the add_post_type_support function makes it very easy to add.

add_action ('init', 'emw_add_excerpt_support');

function emw_add_excerpt_support () {
	add_post_type_support('page', 'excerpt');

Or, if you want it in one line:

add_action ('init', create_function ('', "add_post_type_support('page', 'excerpt');"));