Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add post type support for the post excerpt
<?php
/**
* Add support for the excerpt on pages.
*/
function hd_add_custom_post_type_excerpt_support() {
// add post type support for pages.
add_post_type_support( 'page', 'excerpt' );
// add post type support for case studies.
add_post_type_support( 'pmd_case_study', 'excerpt' );
}
add_action( 'init', 'hd_add_custom_post_type_excerpt_support' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment