Site logo

Archived topic

How to find the previous edition on Elements?

7 replies · Started by Harvey on September 5, 2021

Viewing posts 1–8 of 8

Hi,

Is there anyway to find the previous version of the GeneratePress Elements?

Thanks,
Harvey

Hi there,

are you talking about Revisions that you have made to the an Element ?

Hi David,

Oh yes, you are right. The previous Revision is exactly what I mean.

Thanks,
Harvey

You're welcome

May I know how I can find the previous Revision of the Element?

Hi Harvey,

May I know how I can find the previous Revision of the Element?

You'll have to use a PHP filter to enable it for GP elements.

Try this.

add_filter('register_post_type_args', 'gp_elements_show_revisions', 10, 2);
function gp_elements_show_revisions($args, $post_type){
 
    if ($post_type == 'gp_elements'){
        $args['supports'] = array( 'title', 'editor', 'custom-fields', 'page-attributes', 'revisions' );
    }
 
    return $args;
}

This option will show up once you've activated it - https://share.getcloudapp.com/BluxWy0L

But I'm not sure if this is retroactive so I don't think changes prior to adding this snippet will be on the revision list.

Hi Elvin,

Sorry for my late reply.

May I know which part should I add this PHP code in?

Thanks again and I look forward to your reply.

Regards,
Harvey

This archived topic is closed to new replies.