Dynamic Web Lab
Back to insights

Enable excerpts in wordpress page

October 4, 20111 min read

WordPress in default does not have the excerpt feature on Page.But you can enable this by entering a few lines of code in Theme functions.php of your template.If your theme doesn’t have function.php then please create one.
[highlight]NOTE: Please take a backup of your theme before doing this theme hack.[/highlight]

Here is the code :

[php]
// Enable excerpt for wordpress pages
function enable_wp_page_excerpt()
{
add_post_type_support(‘page’, ‘excerpt’);
}
add_action(‘init’, ‘enable_wp_page_excerpt’);
[/php]

Writer

Dynamic Web Lab Editorial

We share how we design, engineer, and scale digital products across the GCC, Europe, and the US.

Share this article

Tags

wordpress

Need help implementing this?

We turn these playbooks into shipped features. Let us scope your roadmap and support your team.

Start a project conversation