Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1364623

    Ron_Mayo
    Participant

    How do I Verify a WordPress Site With Google Webmaster Tools? I have x-theme 01

    I need to insert HTML tag

    #1364644

    Joao
    Moderator

    Hi There,

    There is another option where you can download a file and drop it on your public_html via FTP. This is the easiest way.

    The other choice is not hard at all, but you need to install a child theme and than add the following code to the functions.php of your child theme via ftp.

    
    <?php
    add_action('wp_footer', 'add_googleanalytics');
    function add_googleanalytics() { ?>
    // Paste your Google Analytics code here
    <?php } ?>

    More info at: http://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/

    Hope it helps,

    joao

    #1365027

    Ron_Mayo
    Participant
    This reply has been marked as private.
    #1365252

    Nico
    Moderator

    Hi There,

    1st step: Instal child theme.
    2nd step: copy the code above
    3rd step: Then add the code in your child theme’s functions.php file which is located in wp-content/themes/x-child/functions.php

    You could follow the link below on how to install a child theme.

    How to Setup Child Themes

    For more guide check the link below:

    Customization Best Practices

    Hope it helps.

    Let us know how it goes.

    Thanks.

    #1419197

    Ron_Mayo
    Participant
    This reply has been marked as private.
    #1419382

    Ron_Mayo
    Participant
    This reply has been marked as private.
    #1419416

    Rahul
    Moderator

    Hi There,

    Thanks for writing back.

    Yes, would you mind sharing us also your admin credentials so we could check your issue properly?

    Don’t forget to set it as private reply.

    Thanks.

    #1419621

    Ron_Mayo
    Participant
    This reply has been marked as private.
    #1419623

    Ron_Mayo
    Participant
    This reply has been marked as private.
    #1419945

    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the information. I have updated your child theme’s functions.php file and have added this:

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    // =============================================================================
    // TABLE OF CONTENTS
    // -----------------------------------------------------------------------------
    //   01. Enqueue Parent Stylesheet
    //   02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
    
    // Additional Functions
    // =============================================================================
    
    // Add Google Analytics
    // =============================================================================
    add_action('wp_footer', 'add_googleanalytics');
    function add_googleanalytics() { ?>
    
    // Paste your Google Analytics code here
    
    <?php } 
    // =============================================================================
    
    

    All you have to do is to add the Google analytics code. If you are afraid you might messed it up again, please post the Analytics code and we can update it for you. And by the way, I have attached the Integrity 1 demo customizer settings. You can unzip this file and import it in X Addons > Customizer Manager.

    Hope this helps.

    #1421060

    Ron_Mayo
    Participant
    This reply has been marked as private.
    #1421239

    Lely
    Moderator

    Hi There,

    Upon checking, child theme is not active anymore. Activate the child theme and the open functions.php file. Then replace this part:
    // Paste your Google Analytics code here
    With this:

    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
    
    ga('create', 'UA-96184355-1', 'auto');
    ga('send', 'pageview');
    
    </script>
    

    For the homepage, go to Pages > Edit Home > Under Page Attributes > Parent : Choose no parent. Then go to Settings > Reading > Under Frontpage : Choose HOME. That will resolve the issue on your homepage.