Hi,
I want to add revisions to my custom post type. How can I do this? Avia is already working with my cpt, but revisions are missing.
Thanks
Dennis
Hey dennsen,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Victoria
Hi Victoria,
Ok, then why does it sometimes happen that when I switch between avia builder and standard editor, that all the content is gone and I can’t bring it back? Normally I don’t switch between avia and standard, but it happened to me by accident and it was not a very good experience!
Thanks
Dennis
Hi,
You can use the “supports” parameter to add revision support to your cpt (see https://codex.wordpress.org/Function_Reference/register_post_type ). Use it like:
function codex_custom_init() {
$args = array(
'public' => true,
'label' => 'Books',
'supports' => array( 'title', 'editor', 'revisions' )
);
register_post_type( 'book', $args );
}
add_action( 'init', 'codex_custom_init' );
Best regards,
Peter
Thank you Peter!
That helped alot!
Best regards,
Dennis
Hi Dennis,
Great, glad you got it working :-)
Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
Close, thanks alot!