Adding a custom excerpt in WordPress posts is easy – when you’re editing a post, you can turn on the excerpt metabox in screen options and away you go. But that option is not available when you’re editing pages. Thankfully, the add_post_type_support function makes it very easy to add.
1 2 3 4 5 | add_action ( 'init' , 'emw_add_excerpt_support' ); function emw_add_excerpt_support () { add_post_type_support( 'page' , 'excerpt' ); } |
Or, if you want it in one line:
1 | add_action ( 'init' , create_function ( '' , "add_post_type_support('page', 'excerpt');" )); |
Thanks for that, exerpts for an image slider have been driving me nuts for a couple of hours.
This was just the ticket.