I didn’t create a child theme at the beginning, and now I want to insert the code for Google Analytics manually without plugins. What is the best thing to do?

[ad_1]

I have no experience with creating a child theme, and as far as I can see it is necessary if I want future updates not to delete the added codes in the theme

[ad_2]
2 Comments
  1. Use a plugin. Or make one yourself.

    There is no point in doing things “without plugins”. There is no advantage to doing that.

  2. It’s pretty trivial to add a child theme. You just need to add a minimum of 2 files (style.css with a comment block in it and a functions.php)
    And your good to go.

    Once you’ve got that you can just add a ‘wp_footer’ action and slap your code in.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer