Created
October 8, 2021 13:26
-
-
Save wpmark/5cfbf0c7b758d0b057f7f93a18ab837a to your computer and use it in GitHub Desktop.
Add post type support for the post excerpt
This file contains 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 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