Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1206882
    David
    Participant

    Hi guys

    Sorry to be asking a very basic question. Im trying to get the child theme going. Its been recommended for too long now and I would like to also use it for google analytics. I have installed the child theme but Im not sure how to actually use it (the start of my problem). And Im not sure where to add the google analytics code.

    Thanks for your help, its always been very appreciated.

    #1206883
    David
    Participant
    #1206921
    Prasant Rai
    Moderator

    Hello David,

    Thanks for writing in!

    You don’t need a child theme for that. You can to insert analytics code in Customizer > Custom > Javascript. Remember not to include the <script></script> tags.

    Hope that helps. 🙂

    #1207895
    David
    Participant

    Hi Prasant

    Thank you for that, thats very helpful, I did out the code into the header. Which would be better in the header or in the custom section? Im also wanting to see how I can use the child theme. Im not sure how to get started with the editing process though. How do I go about using the child theme for CSS, I have watched quite alot of tutorials on child themes but havent been able to actually get it to work.

    Thanks
    David

    #1208284
    Rad
    Moderator

    Hi David,

    It depends on what you wish to implement. And there are many ways and standard codes, example, you can do it this way by adding to child theme’s functions.php

    add_action('wp_header', 'header_analytics', 999);
    
    function header_analytics () { ?>
    
    <!-- And google analytics below this line -->
    
    <?php }

    This doesn’t need to edit the actual header file 🙂

    Cheers!

    #1211236
    David
    Participant

    Hi Rad

    Thanks for that. If I wanted to add in a style for a link for example how do I go about it so I can call in the link style in?

    Many thanks
    David

    #1211364
    Christian
    Moderator

    You can add CSS in Appearance > Customize > Custom > Global CSS

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1206882 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>