Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dwanjuki/84b58d5c9beaa5496d51f2a700cbea3b to your computer and use it in GitHub Desktop.
Save dwanjuki/84b58d5c9beaa5496d51f2a700cbea3b to your computer and use it in GitHub Desktop.
Add Excerpt Functionality To WordPress Pages
<?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