Created
September 19, 2012 15:30
-
-
Save ramseyp/3750276 to your computer and use it in GitHub Desktop.
Add excerpts to Pages in WordPress
This file contains hidden or 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 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