Scott Lemon
    Spectator
    Posts: 17
    October 28, 2016 at 4:02 pm #30929

    Hello,

    Your comment and observation about the footer made our developer think of an issue!

    He was looking for how to add Google Analytics and found your post: https://theme4press.com/support/topic/analytics-code/

    So he modified the footer.php and changed:

    wp_footer();
    ?>

    to be:

    ?>
    <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&#8217;,’ga’);

    ga(‘create’, ‘UA-ghijklm-xy’, ‘auto’);
    ga(‘send’, ‘pageview’);

    </script>
    <? wp_footer();
    ?>

    We see now that he used the <? wp_footer(); tag, instead of the <?php wp_footer(); tag !

    Thank you for taking a deeper look at the page, and noticing this issue with the footer! That gave us the pointer of what to look at.

    We are curious … why don’t you have the Google Analytics built into the theme, or have a better way to insert this?

    Thank you very much!!

    Roman
    Spectator
    Posts: 3147
    October 28, 2016 at 6:49 pm #30932

    a better way to insert this (at this moment) is to use a child theme 😉