Title: Javascript injection broke
Last modified: April 13, 2023

---

# Javascript injection broke

 *  Resolved [camillecc](https://wordpress.org/support/users/camillecc/)
 * (@camillecc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/javascript-injection-broke/)
 * Hi,
 * I used the plugin to add a header javascript. At first it was fine. Today I changed
   the Javascript and now it is broken (js is displayed at the top of the page).
   If I revert to the same js I had before (and that worked), the same thing happens.
   Can you please let me know how to fix this?
 * Thank you for your help.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-injection-broke%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/javascript-injection-broke/#post-16652085)
 * Hi [@camillecc](https://wordpress.org/support/users/camillecc/),
 * Your code is either missing the `<script>` tags or you need to switch the code
   type to JavaScript in the WPCode snippet settings.
 * If you are adding the code using the Header & Footer area you will have to wrap
   your code in `<script></script>` tags as that area is meant for HTML code.
 *  Thread Starter [camillecc](https://wordpress.org/support/users/camillecc/)
 * (@camillecc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/javascript-injection-broke/#post-16652094)
 * Oh wow can’t believe I missed this. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Javascript injection broke’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [camillecc](https://wordpress.org/support/users/camillecc/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/javascript-injection-broke/#post-16652094)
 * Status: resolved