[Resolved] How to find the previous edition on Elements?

Home Forums Support [Resolved] How to find the previous edition on Elements?

Home Forums Support How to find the previous edition on Elements?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1919608
    Harvey

    Hi,

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

    Thanks,
    Harvey

    #1919625
    David
    Staff
    Customer Support

    Hi there,

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

    #1921586
    Harvey

    Hi David,

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

    Thanks,
    Harvey

    #1922198
    David
    Staff
    Customer Support

    You’re welcome

    #1922446
    Harvey

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

    #1922455
    Elvin
    Staff
    Customer Support

    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.

    #1942171
    Harvey

    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

    #1942749
    Ying
    Staff
    Customer Support

    Hi Harvey,

    You can use one of the method mentioned in this article:
    Adding PHP: https://docs.generatepress.com/article/adding-php/

    I would say using Code Snippet plugin is the easiest way if you are not using a child theme already.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.