treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Using Javascript in Wordpress

  • I would like to be able to use javascript in a Wordpress Page, without a plug-in.
    I need to function to look like this. Is this possible within a Wordpress Page?

    OR

    Is there a plug-in EXACTLY like this one?

    http://www.palettedesign.com/htmlsite/home.html

    Thanks
  • Hey Kloy,
    Not entirely sure what you mean by a JavaScript plugin, you don't really need one for that

    As for image sliders, here's a whole bunch of wordpress ones
    http://wordpress.org/extend/plugins/tags/slideshow

    Karl
  • i meant i want to be able to use the function from that page using the straight javascript WITHOUT the use of a plug in. Is that possible?
  • Yeah sure, go into your themes folder and modify the template to include your own JS
    Not sure what file to look for as I think it will change based on the theme you use which is why plugins work best, have a look through the source and look for the file that outputs the section of page you'd like to include your script
  • I guess that means going into the functions.php file...right?
    I'm still learning how to do that with screwing everything up.

    I've added the jQuery link at the bottom of the footer and have the .js file.
    Is there a way to point to the .js file without going into the functions.php file.
  • I think you're a little confused here, kloy.

    If you want to do this for one page and one page only, just create a new page template.