Adding script to head not working

Hello BB team,

I’m such a fan of the theme and plugin. It’s transformed my business model drastically and positively. Just thought that I’d mention that.

On to my question: I have a third party script that has to be loaded to a client site, but it doesn’t seem to work. However, when I review the code, I see that it has been added before the </head>, but it doesn’t seem to be working. The script from the source code is below.

<script type=“text/javascript” src="//www.chattorney.com/Scripts/chattorney.loader.js" ></script>
<script type=“text/javascript”>function startChattorney() { jQuery(document).deetplug({ items: [[“Ea-specialneeds”, “Special Needs”],[“Ea-elderlaw”, “Elder Law”],[“Ea-estates”, “Estate Planning”],[“Ea-assets”, “Estate/Trust Administration”]], headerText: “Live Chat - Click here”, systemText: “If you would like to chat with someone from our office, type your name below to get started. Thank you.”, welcomeText: “Thank you. Please answer a few questions while we locate a member of our staff.”, systemBanner: “Elville & Associates”, bounce: false }); } </script>

<link rel=“stylesheet” href=“http://elvilleassociates.com/wp-content/themes/bb-theme-child/style.css” /></head>

The same script works on the predecessor website, so I’m not sure what gives. Any guidance that you can provide, would be wonderful.

Here is the link to old Joomla website. You can see the Legal Chat feature at the bottom of the page.

http://66.147.242.162/~elvillea/elvilleassociates/

Here is the new site:

http://elvilleassociates.com

Thank you for your time!

Hey Pablo,

Welcome to the BB forums! :slight_smile:

Good to hear BB is working out well for you! Regarding the code you have above, are you sure it’s to be placed in the <head> section? I can see in the Joomla site you have it’s placed on the footer part of the page. Have you tried getting in touch with the guys who provided the code?

Ben

Hi Ben,

That’s a good point. I will put in the footer to see if that fixes the issue. Yes, I have contacted the vendor and they have little by way of support. Let’s see how your suggestion works.

Is there any difference in hard coding the code to the template versus using the customizer?

Hey Pablo,

I don’t think there is any difference in the customizer head code and footer code section if you’re using a child theme. The CSS part and JS part, there maybe a bit of a difference.

Ben

It looks like your suggestion worked. Putting in the footer and removing the double quotes from the script got it working. Thank you, Ben.

No worries! Have fun with BB! :slight_smile:

Ben