How to add script code


trying to integrate the widget below but can’t figure out how to make a template to show it.

The Script tab flags it as an error?


<script type="text/javascript" src="//"></script>
<script type="text/javascript">
  var opts = {
    ukey: "GoHjNzdBj2Cy1zA6",
    width: "320",
    height: "320",
  betsmart.load_widget("calculator-odds", opts);

Hi Jack, I don’t really have experience with JS myself so I passed this along to another dev to take a look. They confirmed that the script you shared above doesn’t seem to work in L&L, but they noted that it also didn’t work outside of an L&L template either and even outside of WordPress itself. I’m not sure what that betsmart script is supposed to do, but it seems that this isn’t an L&L issue and that the issue lies with the script itself.

One thing to keep in mind though is that I’m pretty sure the Script tab in the L&L template editor only accepts javascript code and if I’m not mistaken, <script type=... is HTML, which is probably why it wouldn’t work if you pasted that into the Script tab. I think it would need to be pure JS for that to work. In theory, you could paste this into the Template tab since that area accepts HTML, but given that your script doesn’t seem to be working in the first place, that would be the first thing that needs to be solved before you can get this to work.

Sorry that I don’t have clearer feedback, at the end of the day it looks like this is probably a JS issue and might not be something that people on this forum are going to be able to give you too much guidance about. Best of luck getting this working!