Add Excerpt to WordPress Pages: How To

Home/Add Excerpt to WordPress Pages: How To

From time to time, as a web programmer you come across things that deviate from the norm. This is certainly one of them – adding an excerpt box to WordPress Pages. As you probably already know if you stumbled across this article, this feature already exists in Posts, and the need for the same functionality is very small with Pages, so it’s often overlooked.

Fortunately, there’s a very easy fix.

Simply add the following code to your theme’s functions.php file and you’ll be good to go.

add_action( 'init', 'my_add_excerpt_to_wp_pages' );
function my_add_excerpt_to_wp_pages() {
     add_post_type_support( 'page', 'excerpt' );
}
2014-08-27T01:15:12+00:00 August 27th, 2014|Web Programming, WordPress Snippets|0 Comments

About the Author:

Warren Chandler is a freelance web programmer and web developer, based in Frinton on Sea, Essex. Warren specialises in web programming, web design, corporate identity, copy writing, SEO, logo and print media for home, work, and mobile platforms.

Leave A Comment