Title: add Javascript in a page
Last modified: November 7, 2016

---

# add Javascript in a page

 *  [imbelhassen](https://wordpress.org/support/users/imbelhassen/)
 * (@imbelhassen)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/add-javascript-in-a-page/)
 * Hi,
 * I am using WordPress 4.5.4 and I am trying to add a code to a page. It is a code
   from affiliate network that is supposed to create a product store in the page.
   I don’t know if I am allowed to post the code here or not, but this is the first
   line : <script type=”text/javascript”>
    I tried many plugins for javascript but
   didn’t work.
 * How can I add this code to a wordpress page ?
 * regards,

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/add-javascript-in-a-page/#post-8405935)
 * useful codex: [https://codex.wordpress.org/Using_Javascript](https://codex.wordpress.org/Using_Javascript)
 *  [j09](https://wordpress.org/support/users/j09/)
 * (@j09)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/add-javascript-in-a-page/#post-8406204)
 * If I understand your inquiry correctly, you need to add a script to a single 
   page.
 * Meaning, you want it to only load on that particular page and not on the rest
   of the pages. If so, consider using this plugin:
 * [Per Page Add to Header](https://wordpress.org/plugins/per-page-add-to/)
 * This Plugin will give you a small box at the bottom of the page editor that you
   can use to add things to that page’s header.
 * Mind you, loading scripts in the header is not very SEO friendly unless you async
   the scripts.
 * —————————————————————————————-
 * Just in case I understood wrong and you actually want the script to load in the
   body of the page,
 * Then add the script text between these two tags on your page
 *     ```
       <script type="text/javascript">
       "Your Script Stuff Goes Here"
       </script>
       ```
   
    -  This reply was modified 9 years, 6 months ago by [j09](https://wordpress.org/support/users/j09/).
 *  Thread Starter [imbelhassen](https://wordpress.org/support/users/imbelhassen/)
 * (@imbelhassen)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/add-javascript-in-a-page/#post-8406889)
 * thanks, but it turned out to be the “ad stop” in my browser that is stopping 
   it

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

The topic ‘add Javascript in a page’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [imbelhassen](https://wordpress.org/support/users/imbelhassen/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/add-javascript-in-a-page/#post-8406889)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
