Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have created a custom Post Type, and Registered it.

Can someone help me how to enable revisions to Custom Post type?

share|improve this question
How did you register it? Using register_post_type or some plugin? –  kraftner Mar 24 at 15:32
I though that revisions worked for all post types. Can someone confirm or deny that? –  s_ha_dum Mar 24 at 15:38
@s_ha_dum you need to enable it manually. There is no default set for "Revisions" in 'supports' in register_post_type. Only title and editor are set as default. Check the codex codex.wordpress.org/Function_Reference/register_post_type –  Pieter Goosen Mar 24 at 15:53
@PieterGoosen : thanks. I kinda hate revisions and think they are poorly implemented so I don't deal with them much. :) –  s_ha_dum Mar 24 at 15:55
@s_ha_dum I agree. I always disable revisions in wp-config. They take up unneccesary space in the db –  Pieter Goosen Mar 24 at 15:56

1 Answer 1

When you register your CPT, you need to manually add support for revisions. Only title and editor are set as defaults. Check out the codex. So if you need to enable revisions, you need to add it like this

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

in your $args = array() when registering your CPT.

Just for info, here are the other arguments you can pass to 'supports'

'editor' (content)
'thumbnail' (featured image, current theme must also support post-thumbnails)
'comments' (also will see comment count balloon on edit screen)
'revisions' (will store revisions)
'page-attributes' (menu order, hierarchical must be true to show Parent option)
'post-formats' add post formats, see Post Formats
share|improve this answer
I have place in Support array. Works fine. Thanks, @pieter .. –  Bhanu Prakash Mar 24 at 16:30
@BhanuPrakash glad I could help. Just remember to tick my answer as accepted then. –  Pieter Goosen Mar 24 at 16:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.