Tagged: x
-
AuthorPosts
-
January 9, 2017 at 4:44 am #1322105
Andreas BjerveParticipantHi,
I was told there is a java-script error on my site, but I don´t have the brains to see it or correct it myself. I was told “there are multiple punctuation errors and the closing script tag is followed by more javascript code which is incorrect”. Could you guys have a look and perhaps provide me with the correct code?
<script id=”cornerstone-custom-page-js”><div;id=”fb-root”></div>;<script>(function(d, s, id) {; var js, fjs = d.getElementsByTagName(s)[0];; if (d.getElementById(id)) return;; js = d.createElement(s); js.id = id;; js.src = “//connect.facebook.net/nb_NO/sdk.js#xfbml=1&version=v2.8″;; fjs.parentNode.insertBefore(js, fjs);;}(document, ‘script’, ‘facebook-jssdk’));</script>;;(function($){;; $(‘a.manual-optin-trigger’).attr(‘data-optin-slug’,’byyrzaftyzdz4ctu’);; ;})(jQuery);”
January 9, 2017 at 4:45 am #1322106
Andreas BjerveParticipantThis reply has been marked as private.January 9, 2017 at 5:27 am #1322152
ThaiModeratorHi There,
You should put that script under functions.php file locates in your child theme:
add_action( 'wp_head', 'add_custom_script' ); function add_custom_script(){ ?> <div id="fb-root"></div>;<script>(function(d, s, id) {; var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/nb_NO/sdk.js#xfbml=1&version=v2.8"; fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script>; <?php }Regards!
January 9, 2017 at 6:18 am #1322207
Andreas BjerveParticipantRight, thanks! Then I´m gonna go right ahead and ask another stupid question; where do I locate and edit the functions.php file?
Also, should I remove this following Javascript from my home-page then?
<div id=”fb-root”></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/nb_NO/sdk.js#xfbml=1&version=v2.8”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>
(function($){$(‘a.manual-optin-trigger’).attr(‘data-optin-slug’,’byyrzaftyzdz4ctu’);
}Thanks 😀
January 9, 2017 at 6:26 am #1322218
ChristopherModeratorHi there,
Please connect to FTP and find functions.phph file under wp-content/themes/x-child .
Yes, please remove the code from home page.Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1322105 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
