Give WordPress page’s excerpts

A handy snippet to have to hand, for WordPress 3.0+:

function enable_page_excerpt() {
add_post_type_support( 'page', 'excerpt' );
add_action('init', 'enable_page_excerpt');

Add that to your theme’s functions.php file and your good; pages will now show an excerpt panel.

Discuss on Twitter

Mike Jolley is a tech hobbyist, astrophotographer, retro gamer, and software engineer who works at Automattic and contributes to open-source projects such as WordPress and WooCommerce.