Forked from andrewlimaza/add_excerpt_to_wordpress_page.php
Last active
July 2, 2025 12:45
-
-
Save dwanjuki/84b58d5c9beaa5496d51f2a700cbea3b to your computer and use it in GitHub Desktop.
Add Excerpt Functionality To WordPress Pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Excerpt Functionality To WordPress Pages | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function add_excerpt_to_wp_pages() { | |
add_post_type_support( 'page', 'excerpt' ); | |
} | |
add_action( 'init', 'add_excerpt_to_wp_pages' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment