Title: Java Script file in Theme
Last modified: August 19, 2016

---

# Java Script file in Theme

 *  [basanth](https://wordpress.org/support/users/basanth/)
 * (@basanth)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/java-script-file-in-theme/)
 * Hai Friends,
 *  Where to place a javascript file in a theme?How to call that javascript file?
   Do we need to create a folder like “SCRIPTS” in a theme and call them as <script
   type=”text/javascript” src=”/scripts/filename.js”></script>?Please let me know
   the solution
 * Regards
    Basanth

Viewing 1 replies (of 1 total)

 *  [churchthemer](https://wordpress.org/support/users/churchthemer/)
 * (@churchthemer)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/java-script-file-in-theme/#post-877286)
 * You can place script files in a “scripts” directory within your theme’s directory
   and then source them with:
 * `<script type="text/javascript" src="<?php bloginfo("template_url"); ?>/scripts/
   filename.js"></script>`
 * alternatively, you can use the the wp_enqueue_script function in your functions.
   php file.
 * `<?php wp_enqueue_script( 'handle', 'src', 'deps', 'ver'); ?>`
 * for information on this function see:
 * [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)

Viewing 1 replies (of 1 total)

The topic ‘Java Script file in Theme’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [churchthemer](https://wordpress.org/support/users/churchthemer/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/java-script-file-in-theme/#post-877286)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
