How to include a .js in header or footer of your theme?
-
Hello
I would like to include a .js in the Header or Footer of your theme but you already added the script tag so it’s hard for me to include the js file.
<script src="/mycode.js"></script>
will not work and always get error: Unexpected token <
I tried the code:
var script = document.createElement('script'); script.src = "/myfile.js";
But it does not work as well.
Please advise.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to include a .js in header or footer of your theme?’ is closed to new replies.