Skip to content

Instantly share code, notes, and snippets.

@ramseyp
Created September 19, 2012 15:30
Show Gist options
  • Save ramseyp/3750276 to your computer and use it in GitHub Desktop.
Save ramseyp/3750276 to your computer and use it in GitHub Desktop.
Add excerpts to Pages in WordPress
<?php
/**
*
* Add support for excerpts to Pages
* @link http://codex.wordpress.org/Function_Reference/add_post_type_support
* $post_type (string) is a registered post type. In this instance, 'page'.
* $supports (string or array) includes:
'title'
'editor' (content)
'author'
'thumbnail' (featured image) (current theme must also support Post Thumbnails)
'excerpt'
'trackbacks'
'custom-fields'
'comments' (also will see comment count balloon on edit screen)
'revisions' (will store revisions)
'page-attributes' (template and menu order) (hierarchical must be true) (the page template selector is only available for the page post type)
'post-formats' add post formats, see http://codex.wordpress.org/Post_Formats
*/
add_post_type_support( 'page', 'excerpt' )
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment