Keith Devon

Menu

Adding the excerpt function to WordPress pages

The excerpt function that is so useful in WordPress posts, does not come as standard on pages. Luckily, the fix is easy. Add the following code to your functions.php file and voila! Excerpts on wordpress pages.

// add excerpts to pages

function add_page_excerpt_meta_box() { add_meta_box( ‘postexcerpt’, __(‘Excerpt’), ‘post_excerpt_meta_box’, ‘page’, ‘normal’, ‘core’ ); }

add_action( ‘admin_menu’, ‘add_page_excerpt_meta_box’ );

Leave a Reply

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