How to add a javascript to a specific wordpress page?

by 3 replies
5
I have a date javascript that lets you set a rolling advance date for several days ahead and display the results.

For example if you came to my webpage today , you could have on your wepage, return by Friday Dec. 16th and I'll include a bonus..

It works fine on an HTML page but not on on a Wordpress page. I've searched for different solutions but I can't figure them out.

Any suggestions?

Thanks, Ron
#website design #add #javascript #page #specific #wordpress
  • Hi,

    To use it in a Wordpress post, place all of your JS in a file, then link to it in the post like this:

    <script type="text/javascript" src="yourfile.js"></script>

    And then place the action after that such as onClick="yourAction();"
    • [1] reply
    • Thanks for the suggestions. I tried the plugin and it worked.

  • Or, use this plugin

    WordPress › Raw HTML « WordPress Plugins

    Cheers,
    Rob

Next Topics on Trending Feed