Tagged: x
-
AuthorPosts
-
August 28, 2016 at 2:05 pm #1150723
janequadeParticipantI followed instructions in thread post #247434
Added code then GA code as instructed.
Now I cannot log into my website or make any changes.
Getting following errorThe cbigmd.com page won’t load
can’t log into cbigmd.com/wp-admin either
ERROR
cbigmd.com is currently unable to handle this request.credentials in next post.
August 28, 2016 at 2:06 pm #1150724
janequadeParticipantThis reply has been marked as private.August 28, 2016 at 5:29 pm #1150829
RadModeratorHi there,
Thanks for writing in.
It should be okay now, you shouldn’t add your embed code directly to functions.php without a hook. And embed code is not HTML and not PHP.
I removed this from your parent theme’s functions.php
<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','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-75246404-1', 'auto'); ga('send', 'pageview');Instead, please add this code to your child theme’s functions.php
add_action('wp_footer', 'footer_embed_code' ); function footer_embed_code () { ?> <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','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-75246404-1', 'auto'); ga('send', 'pageview'); </script> <?php }As you’ll notice, there is
?> <?phpwrapping your embed code. That indicates that within it are HTML content.?> HTML CONTENT HERE <?phpHope this helps.
August 28, 2016 at 9:53 pm #1151144
janequadeParticipantThanks so much for helping me out here.
Much appreciated.August 28, 2016 at 9:54 pm #1151145
Rue NelModeratorYou’re welcome! We’re happy to help you out.
If you need anything else we can help you with, don’t hesitate to open another thread. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1150723 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
