Total Pageviews

Wednesday, 30 October 2013

use excerpt for pages or any post type


Easily Add “Excerpt” Support for Pages in WordPress

add_post_type_support('page', 'excerpt'); //'page' is post type

Registers support of certain feature(s) for a given post type. Each feature has a direct impact on the corresponding field displayed in the post edit screen, such as the editor or a meta box. Additionally, the 'revisions' feature dictates whether the post type will store revisions, and the 'comments' feature dictates whether the comments count will show on the post edit screen.

Add the function in your theme's functions.php file.

Further reference : http://codex.wordpress.org/Function_Reference/add_post_type_support

No comments:

Post a Comment