# Javascript code is loaded twice with the same id

**URL:** <https://community.hubspot.com/t/javascript-code-is-loaded-twice-with-the-same-id/24334>\
**Category:** CMS Development\
**Tags:** javascript\
**Created:** [August 18, 2020, 6:21pm UTC](https://community.hubspot.com/t/javascript-code-is-loaded-twice-with-the-same-id/24334 "2020-08-18T18:21:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danny\_briskin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danny_briskin/32/28756_2.png) [@danny\_briskin](https://community.hubspot.com/u/danny_briskin)\
**Post date:** [August 18, 2020, 6:21pm UTC](https://community.hubspot.com/t/javascript-code-is-loaded-twice-with-the-same-id/24334/1 "2020-08-18T18:21:06Z")

</div>

Hello,

We are using Hubspot in our WordPress based site (with official HubSpot plugin for WordPress).

During optimizations regarding WCAG2.0 compliance, I have noticed that the same script is loaded twice:

1. 

`<script type="text/javascript" id="hs-script-loader" async="" defer="" src="//js.hs-scripts.com/2470523.js"></script>`

1. 

`<script async="" defer="" id="hs-script-loader" type="text/javascript" src="//js.hs-scripts.com/2470523.js?integration=WordPress"></script>`

Both elements have the same id (hs-script-loader) which is not good of course, and why twice?

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [August 19, 2020, 3:28pm UTC](https://community.hubspot.com/t/javascript-code-is-loaded-twice-with-the-same-id/24334/2 "2020-08-19T15:28:54Z")

</div>

[@danny\_briskin](https://community.hubspot.com/t5/user/viewprofilepage/user-id/142239) My guess is that you have the official HubSpot WordPress plugin installed in addition to manually adding the HubSpot script to your site in your theme somewhere. I’d try and look in your theme files for the script.

It most likely would be in functions.php, footer.php, or header.php.

If you can locate it, remove it, then just use the HubSpot plugin.

---

<div class="post-metadata">

**Author:** ![danny\_briskin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danny_briskin/32/28756_2.png) [@danny\_briskin](https://community.hubspot.com/u/danny_briskin)\
**Post date:** [August 20, 2020, 6:22pm UTC](https://community.hubspot.com/t/javascript-code-is-loaded-twice-with-the-same-id/24334/3 "2020-08-20T18:22:51Z")

</div>

Thank you so much!

It was in parent theme footer… Someone/something put it there a long time ago maybe.
