WordPress 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
<?php 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 WordPress.org 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()
Leave a Reply