Modify Header.php in child theme - by ianabel

This topic has 4 replies, 2 voices, and was last updated 4 years, 4 months ago ago by Olga Barlow

  • Avatar: ianabel
    ianabel
    Participant
    December 9, 2019 at 20:20

    Hello,

    I want to set the google analytics gtag.js code in header.php but I dont see header.php in child theme, only in father theme. How can I set this google code in my website?

    Reagards

    3 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 10, 2019 at 12:40

    Hello,

    1) Read more about child theme and how to make changes there https://developer.wordpress.org/themes/advanced-topics/child-themes/

    2) Use Insert Header and Footers plugin to add JS code in the header or footer. Then you won’t lose it if you decide to change theme.

    Regards

    Avatar: ianabel
    ianabel
    Participant
    December 10, 2019 at 12:58

    Ok thank you!

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 10, 2019 at 14:02

    You are welcome.

    Regards

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

The issue related to '‘Modify Header.php in child theme’' 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.