WordPress.org

Ready to get started?Download WordPress

Forums

Post revisions not saving for custom post types (5 posts)

  1. thhhhh
    Member
    Posted 1 year ago #

    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: http://pastebin.com/Bmn6p4Md

    Thanks in advance for any help.

  2. thhhhh
    Member
    Posted 1 year ago #

    Anyone? I'm still having trouble with this.

  3. thhhhh
    Member
    Posted 1 year ago #

    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?

  4. 2winfactor
    Member
    Posted 1 year ago #

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

    'supports' => 'revisions'

    To your custom post type declaration?

    http://codex.wordpress.org/Function_Reference/register_post_type

    That should add revision support for your custom post type.

  5. thhhhh
    Member
    Posted 1 year ago #

    Hi,

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic