WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Any way to disable post revision on specific post types only?

share|improve this question
up vote 3 down vote accepted

Remove the revisions property inside the supports parameter of register_post_type().


$args = array(
    // ...
    'supports' => array('title','editor','thumbnail','comments','revisions')

Change to:

$args = array(
    // ...
    'supports' => array('title','editor','thumbnail','comments')
share|improve this answer
Actually it turned out that it is disabled by default... so. – jayarjo Oct 3 '11 at 19:08

If you don't have control over the post type registration, you an use the remove_post_type_support() function:

add_action('admin_init', 'disablew_revisions');
function disable_revisions(){
    remove_post_type_support('post', 'revisions');

If you also wish to disable autosave for specific post types, you can do this:

add_action('admin_print_scripts', 'disable_autosave');
function disable_autosave(){
    global $post;
    if(get_post_type($post->ID) === 'post'){
share|improve this answer
Nice answer. I'm thinking it might be a touch better to use wp_dequeue_script instead of wp_deregister_script for WP v 3.1+. – goto10 Apr 16 '12 at 21:40

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.