Support » Fixing WordPress » Post revisions not saving for custom post types

  • Hello

    My website uses a number of custom post types, as well as “posts” and “pages”.

    I’ve noticed that revision history appears automatically for “posts” and “pages”, while when custom post type entries have no revision history at all. I plan to eventually enable revisions for all the custom fields for my individual custom post types, but can’t get working on that until revisions are at least recorded – even when I change post_title or the_excerpt, there is no revision history.

    Has anyone had any similar issue with custom post types?

    Should any php ninjas stumble upon this, here is my functions.php file where the custom post types are defined – what I assume to be the probable culprit:

    Thanks in advance for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anyone? I’m still having trouble with this.

    Maybe a bit of clarification can help with finding a solution…

    1. Where I define all of my custom post types, in functions.php, I specifically enabled revisions. So when I say that there is “no revisions history at all”, what I mean is that the “Revisions” box that shows up as I edit custom post types does not contain any history of edits made to a post, unless it is a “post” or a “page”. The box shows up but it is always empty. I’ve also tried the “Revision control” plugin and manually inputted all post types which revisions should be enabled for. This doesn’t change much – I get an empty box entitled “Revisions” that doesn’t save any individual edits.

    2. We are no longer dealing with WordPress 3.3.2 – I’ve updated the core to 3.4.2 but it has had no effect on this problem. I thought perhaps I had edited a line of code in the core that was causing this trouble, but that doesn’t seem to be the case.

    Anyone have any ideas?

    Not sure if you solved this, but did you try adding

    'supports' => 'revisions'

    To your custom post type declaration?

    That should add revision support for your custom post type.


    Still unsolved and I am considering backing up my entire site and re-installing it to try to get this working.

    I did add ‘revisions’ to my supports array.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post revisions not saving for custom post types’ is closed to new replies.