Title: Javascript in WordPress
Last modified: August 24, 2016

---

# Javascript in WordPress

 *  [d24bishop](https://wordpress.org/support/users/d24bishop/)
 * (@d24bishop)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/javascript-in-wordpress-3/)
 * Greetings,
    I have a collection of Javascript samples I have created over the
   years. I am trying to put these on my site. They are all in folders with the 
   library files, images, etc. Self-contained. I have read the codex and several
   forum posts. I was wondering what is the best way to get these to run in wordpress
   posts. Per the codex:
 * _To include Javascript inside a post, you need to combine the call to the script
   file with the call to the JavaScript itself.
    <script type=”text/javascript” 
   src=”/scripts/updatepage.js”></script> <script type=”text/javascript”> <!– updatepage();//–
   ></script>
 * This makes good sense. My issue is the “scripts” folder, where should it be placed
   on the server (inside or outside of the wordpress install) and then, what would
   the path be specifically? Oh, and is it ok to put .js libraries here?
 * Finally, in the text editor of wordpress (visual editor disabled). Normally I
   would call on libraries and often put the script itself in the <head></head> 
   section of an html page. Is that still the case here? Finally, are <body> and
   <canvas> tags valid? I’m pretty sure <canvas> tags are ok but I am concerned 
   that <body> tags may not be.
 * So sorry if any of this is noobish, And thanks in advance!
 * [fetchthestick.com](http://www.fetchthestick.com)

The topic ‘Javascript in WordPress’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [d24bishop](https://wordpress.org/support/users/d24bishop/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/javascript-in-wordpress-3/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
