Message revisions are not saved or displayed for all custom message types

My site uses several custom post types, as well as the traditional post and page types. For all changes, "posts" and "pages" are displayed, as it should, with a visible history of changes, the ability to compare posts, etc. For all custom message types, I don't have a change history at all. I enabled revisions when defining each of these message types in functions.php, so on each of these message types I get an empty tab labeled “Revisions”, but it does not display or collect any revision data.

I don’t understand how to fix this and any help would be appreciated!

Thanks in advance for any help.

I can publish the functions.php file if it helps solve this problem ... just ask.

+4
source share
3 answers

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

In your custom post arguments array (in functions.php) add “revisions” to the “supports” array:

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

Please note that this will not apply to old pages of this type of message , only new ones created from now on.

If you do anything with custom post types, this article is awesome.

+3
source

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

+1
source

I had the same problem when none of the obvious answers worked. I added the answer to the same question in WPSE: https://wordpress.stackexchange.com/a/109782/11966

It was hard just ...

0
source

Source: https://habr.com/ru/post/1436045/


All Articles