Site logo

[Support request] How to ensure that code won’t be overwritten?

Home Forums Support [Support request] How to ensure that code won’t be overwritten?

Home Forums Support How to ensure that code won’t be overwritten?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2383230
    Petar

    I am using a child theme. But my google analytic code and line of code that is used to serve banners on my site, are placed inside header.php of the main theme between <head> and </head>.

    How to ensure they won’t be overwritten in the future with theme updates? Because I’ve just discovered this happened

    #2383292
    Leo
    Staff
    Customer Support

    Hi there,

    You would need to move that code to the child theme or add it with a hook element:
    https://docs.generatepress.com/article/hooks-element-overview/

    Let me know if this helps 🙂

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