Aleš Sýkora / November 28, 2023 / 0 comments

How to Enable Page Excerpt in WordPress

Post summary: Page Excerpt is disabled by default in WordPress post type Page. Excerpts are enabled for WordPress Posts, but I am not sure, why not for Pages. So, if you need to use the Excerpt in Wordpress Pages, you must add the functionality with the WordPress PHP filter. You can simply put the code in your…

Page Excerpt is disabled by default in WordPress post type Page. Excerpts are enabled for WordPress Posts, but I am not sure, why not for Pages. So, if you need to use the Excerpt in WordPress Pages, you must add the functionality with the WordPress PHP filter.

add_post_type_support( 'page', 'excerpt' );

You can simply put the code in your code snippets plugin. Or just put the code in functions.php or in your custom functionality plugin PHP Code in /mu-plugins/ folder. I am using the Advanced Scripts Plugin.

WordPress excerpt in Gutenberg after activation

Page excerpt will appear in Gutenberg editor sidebar, same as Post Excerpt.

Enable Page Excerpt with Code snippets plugin

Create a new script and set its type to PHP and location to administration area. I am using the Advanced scripts plugin for that.

add_post_type_support( ‘page’, ‘excerpt’ ); in advanced scripts

Save and your Excerpt will be available asap when you edit a page in WordPress.

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

0 comments

Share Your Thoughts