Skip to content

Instantly share code, notes, and snippets.

@bwonur
Last active January 20, 2020 08:28
Show Gist options
  • Save bwonur/a879b934b7d39718ead3fcc0baeaf9ef to your computer and use it in GitHub Desktop.
Save bwonur/a879b934b7d39718ead3fcc0baeaf9ef to your computer and use it in GitHub Desktop.
Disable WordPress Revisions for a Specific "post_type" only.

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

Example

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

Change to:

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

pealm.net pealm.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment