Month: September 2016

Enable revisions for custom post type in WordPress

When you register custom post type, you have to add support for revisions. Title and text editor is the default support. if you want to enable revisions for your custom post type then you have to add like this.

'supports' => array( 'title', 'editor', 'revisions' ),

Add this code in your custom post type creation arguments array. for your information i listed available supports below.

1.'title'
2.'editor' 
3.'author'
4.'thumbnail' 
5.'excerpt'
6.'trackbacks'
7.'custom-fields'
8.'comments' 
9.'revisions' 
10.'page-attributes' 
11.'post-formats'

Have any doubt, then comment here!