Skip to content

Instantly share code, notes, and snippets.

@wpmark
Created October 8, 2021 13:26
Show Gist options
  • Save wpmark/5cfbf0c7b758d0b057f7f93a18ab837a to your computer and use it in GitHub Desktop.
Save wpmark/5cfbf0c7b758d0b057f7f93a18ab837a to your computer and use it in GitHub Desktop.
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