How to edit in my header.php file such that it is not overrided when updated?

This topic has 4 replies, 2 voices, and was last updated 3 years ago ago by Rose Tyler

  • Avatar: aurangzebaa
    aurangzebaa
    Participant
    December 4, 2021 at 08:50

    i am trying to add some code(hotjar) into header.php in the child theme by making a new header file but now there is some error in the site.

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    December 4, 2021 at 09:17

    Hello,

    Please note that we are not responsible for the third-party code.
    Have you copied the header.php file from the parent theme into the child and do changes there?
    Some of our customers use Insert Headers and Footers plugin to add Google analytics code and so on.

    Regards

    Avatar: aurangzebaa
    aurangzebaa
    Participant
    December 4, 2021 at 10:47

    no i made a new file and named it header.php and added it to child using FTP

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    December 4, 2021 at 11:46

    Read this article – https://developer.wordpress.org/themes/advanced-topics/child-themes/#adding-template-files , you need to copy header.php file from the patent theme into the child and do changes there.

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘how to edit in my header.php file such that it is not overrided when updated?’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.