Title: how to include javascript
Last modified: August 20, 2016

---

# how to include javascript

 *  Resolved [burakb](https://wordpress.org/support/users/burakb/)
 * (@burakb)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/how-to-include-javascript/)
 * Hey all,
 * I’m on my way to building a custom homepage for my wordpress blog. I tried to
   put a javascript slider to the homepage. Although the js slider works fine on
   an html page when it is included on my wordpress home page, it does not work 
   at all. Since I’m very new to javascript I have no idea how to fit this code 
   into my custom wordpress page.
 * Any help I would appreciate.
 * All the best
    Burak
 * Here is my code that works absolutely fine on an html made page:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_

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

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/how-to-include-javascript/#post-2166597)
 * Create a [custom template](http://www.wordpressmax.com/customize-wordpress/custom-page)
   for your homepage and put your JavaScript there. Alternately, [code a widgetized area](http://wpmu.org/how-to-widgetize-a-page-post-header-or-any-other-template-in-wordpress/)
   into the appropriate spot in whatever existing template you’re using, and put
   your JavaScript into a text widget.
 *  [Paul Kaiser](https://wordpress.org/support/users/freakingid/)
 * (@freakingid)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/how-to-include-javascript/#post-2166601)
 * Hey Burak,
    Adding JavaScript right in your template could lead to problems with
   plugins and such later. You might consider seeing if an existing [slider plugin](http://wordpress.org/extend/plugins/search.php?q=slider&sort=)
   meets your needs. Commonly, the slider plugin would include a template tag you
   could easily place in a custom template as zoonini recommends. Paul
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/how-to-include-javascript/#post-2166632)
 * [@freakingid](https://wordpress.org/support/users/freakingid/) is absolutely 
   right in that you do need to be careful if calling in JavaScript libraries such
   as jQuery manually, to be sure they don’t conflict with libraries already called
   in by WP core or plug-ins. There is a method for doing this called [“enqueuing”](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
   if you want to learn more. Otherwise, looking for a slideshow plug-in – as freakingid
   suggests – is often a very simple route to take.
 *  Thread Starter [burakb](https://wordpress.org/support/users/burakb/)
 * (@burakb)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/how-to-include-javascript/#post-2166963)
 * Thank you so much guys. I decided to use the [anything slider ](http://wordpress.org/extend/plugins/anythingslider-for-wordpress/)
   plugin. It is a great solution for dummies like me. All the best.

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

The topic ‘how to include javascript’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [burakb](https://wordpress.org/support/users/burakb/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/how-to-include-javascript/#post-2166963)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
