5

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.

I could post my functions.php file if it helps solve this... just ask.

user1695870
  • 51
  • 1
  • 3
  • 1
    Does anyone know, perhaps, all of the places in a wordpress site that somehow affect or control the revisions feature? I get the sense that this is a very rare problem, so I'm curious about all of the places in my site that something may have gone wrong. I should specify that I've tried updating the wordpress core, and I've also tried the "Revision Control" plugin, both to no avail – user1695870 Oct 04 '12 at 22:16

3 Answers3

4

I know this is an old Q, but just had the same problem and fixed it...

In your custom post type args array (in functions.php) add 'revisions' to the 'supports' array:

$args = array(....., 'supports' => array(..., 'revisions'),......);

Note however that this wont take effect for old pages of this post type, just new ones created from now on

If you're doing anything to do with custom post types, this article is awesome.

hobailey
  • 850
  • 1
  • 12
  • 22
  • One correction to note on this answer, and it's possible newer versions of WP behave differently, but adding support for revisions will enable revisions for old posts of this post type. Revisions will not show until you both: 1. make an edit (and update the post) and 2. Show the revisions metabox using the Screen Options menu. – jdm2112 Oct 30 '14 at 02:42
1

As far as I know, Wordpress by default does not store revisions for custom post meta. However, there is a great article on how to add revisions to post meta http://lud.icro.us/post-meta-revisions-wordpress/

RRikesh
  • 12,503
  • 5
  • 45
  • 65
0

I was having the same problem where none of the obvious answers worked. I added an answer to the same question on WPSE: https://wordpress.stackexchange.com/a/109782/11966

It was frustratingly simple...

Community
  • 1
  • 1
Jake
  • 2,030
  • 2
  • 23
  • 31