Post revisions don’t save or show up only for custom post types

My website makes use of a number of custom post types as well as the traditional “posts” and “pages” types. For all “posts” and “pages” revisions show up as they should, with a history of edits visible, the option to compare posts, and so on. For all custom post types, I have no revision history at all. I’ve enabled revisions when defining each of these post types in functions.php, so on each of these post types I get a blank tab that says “Revisions” but does not display or collect any revisions data.

I’m at a loss for how to fix this and any help would be appreciated!

Thanks in advance for any assistance.

2 s
2

I just wasted a lot of time figuring this out.

There are number of things a user should rule out first.

  1. Deactivate any plugins and switch to a default theme like twenty-thirteen if the below items do not work.
  2. To make sure that you don’t have revisions turned off, be sure this does not exist in wp-config.php: define('WP_POST_REVISIONS', false);
  3. While on a page/post edit panel, click on “Screen Options” in the top right and look for a “Revisions” checkbox and make sure it is active.

That will usually fix most people’s problems.

However. If there are no revisions for the post/page/custom-post-type you are looking at, the revisions option will not show up under Screen Options. You will know you have actual revisions on the current post if a revision count shows up in the right sidebar under “Publish” as the image below illustrates (Revisions: 2):

There are revisions on this image

If you don’t see that, then clicking on “Screen Options” will not show “Revisions”. So “Update” the post and then it should create a revision, and THEN you can click on Screen Options at the top and turn revisions on…

A little frustrating that it works that way, but hopefully that helps somebody else.

Leave a Comment