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’ );

Tags: , , ,

WordPress SEO: 10 tips for better search rankings

FREE E-book. Learn the basics of WordPress SEO and how to improve the key metrics
  • We won't sell your address to anyone. We hate spam too.
View my portfolio Get in touch

Leave a Reply