Adding Custom JavaScript Issue

Posted in: Newspaper
Post count: 14

Hi,

Can you help me understand how I am supposed to deal with this issue? The theme has the option to add custom JavaScript but it says to not include these tags “<script></script>”. The issue I am having is that the 3rd party JavaScript that I am supposed to use has an attribute in that very tag. Here is the copy of the code.

<script data-skip-moving=”true”>
(function(w,d,u,b){
s=d.createElement(‘script’);r=(Date.now()/1000|0);s.async=1;s.src=u+’?’+r;
h=d.getElementsByTagName(‘script’)[0];h.parentNode.insertBefore(s,h);
})(window,document,’https://cdn.bitrix24.com/b4627595/crm/site_button/loader_4_p3llqw.js&#8217;);
</script>

How am I to deal with this issue?

Post count: 9544

You might add to the header.php or footer.php file, or perhaps add to the custom code box for google analytics ?

Post count: 14

which custom code box? Can you be very detailed in what you are suggesting I do to get custom JS to work with your theme?

Post count: 9544

See the theme docs on how to use the big giant custom code option in the theme panel ?

If you look at the theme admin panel – there is section ‘custom code’ — designed to use… well, what it says. You can possibly add to the google analytics box if you don’t know how to edit your header.php or footer.php file.

I don’t work here.

Post count: 22421

Hello,

If your code needs the script tags, then you should implement it into the php files in the header.php or footer.php files found in the main theme folder.

Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.