Title: Add Javascript Code
Last modified: October 1, 2025

---

# Add Javascript Code

 *  Resolved [jimk1416](https://wordpress.org/support/users/jimk1416/)
 * (@jimk1416)
 * [8 months, 1 week ago](https://wordpress.org/support/topic/add-javascript-code/)
 * Someone gave me this JavaScript code to add as a footer. How do I add this code
   as a JavaScript snippet.
   It showing errors when I add it like this:
 *     ```wp-block-code
       <script type="text/javascript" src="https://widget.resupplyapp.com/prod/loader.js" widget_code="0fcaa74ef466ce8a2b95445fed78c2a8"></script>
       ```
   

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

 *  Plugin Support [markomiljanovic](https://wordpress.org/support/users/markomiljanovic/)
 * (@markomiljanovic)
 * [8 months, 1 week ago](https://wordpress.org/support/topic/add-javascript-code/#post-18665045)
 * Hi [@jimk1416](https://wordpress.org/support/users/jimk1416/),
 * The code you provided is actually an HTML `<script>` tag that loads an external
   JavaScript file, it’s not a JavaScript snippet itself. That’s why trying to add
   it as a JavaScript code snippet gives you errors.
 * There are two ways to add this script to the footer using WPCode:
 * **Header & Footer Section:**
   The simplest method is to add the script directly
   into the Footer section under “**Header & Footer**” in the plugin settings. For
   reference, please see this screenshot: [https://a.supportally.com/i/xF1T3J](https://a.supportally.com/i/xF1T3J)
 * **As a Code Snippet:**
   You can add it as a regular code snippet. To do this, 
   go to **Code Snippet > + Add Snippet > Add Your Custom Code (New Snippet)** and
   select **HTML Snippet**. Paste your code, choose the “**Site Wide Footer**” as
   the insert location, and then save the snippet. Here’s a reference screenshot:
   [https://a.supportally.com/i/mw5KZy](https://a.supportally.com/i/mw5KZy)Let me
   know if I can provide more info.
 *  Thread Starter [jimk1416](https://wordpress.org/support/users/jimk1416/)
 * (@jimk1416)
 * [8 months, 1 week ago](https://wordpress.org/support/topic/add-javascript-code/#post-18665359)
 * Hello and thanks for the info. I had tried both of those methods already and 
   neither method worked. So I suspect they have not given me good code.

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

The topic ‘Add Javascript Code’ 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: [jimk1416](https://wordpress.org/support/users/jimk1416/)
 * Last activity: [8 months, 1 week ago](https://wordpress.org/support/topic/add-javascript-code/#post-18665359)
 * Status: resolved