Add Excerpts to WordPress Pages

WordPress : How to enable Excerpt for Pages

Add Excerpts to WordPress PagesWordPress gives us the ability to manually create excerpts for your Posts by entering text into an Excerpt box just below the main editing screen on the Write/Edit page. But Excerpt is not available for Pages .There is  no option to add/enable excerpts for pages through the WordPress admin panel. We need to add following code to functions.php of active theme to enable Excerpt for Pages

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

After that, edit a page and click Screen Options at the top right, it’s underneath Howdy,….

You’ll see Excerpt checkbox there. The excerpt box appeared when you check/mark Excerpt

There is a plugin name Page Excerpt in repository that create a manual excerpt box without you add code to functions.php

Once we typed hand-crafted summaries of our content into Excerpt box, the theme get excerpt by using this code: the_excerpt() or echo get_the_excerpt()


One response to “WordPress : How to enable Excerpt for Pages”

  1. Eduard Misk Avatar
    Eduard Misk

    Thank you. It’s what i need to customize header.

Leave a Reply

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

%d bloggers like this: