Javascript function – how to call it in WordPress
-
I am migrating a static site (which is now offline because I have made the WordPress site the current one) and it has a few calculators on some of the pages. When I say a few, there are 7-8 of them, which I have added to one file (scripts.js). Each of the calculators is on a separate page, with their own functions to enable them to work (which they did before, but I dont know how to make them work now). These are simple fitness calculators, for different things.
I uploaded the scripts.js file in my scripts folder under my theme folder and have tried to call that from the header file, but to no avail!
I have also tried following the instructions on this post http://wordpress.org/support/topic/147154?replies=4, but I dont really understand how to do it, as I dont have a ‘single.php” file with my them. I have also read the WordPress Codex documentation on Javascript, which I followed, but it didnt solve my problem either…
I am using my site as a CMS, so using pages, as opposed to posts.
I am sure it must be something simple that I am missing, but I dont know what it is and I am getting a bit frustrated with it all.
Is there anyone who can possibly give me advice on what to do with the javascript to make it work?
Thanks
The topic ‘Javascript function – how to call it in WordPress’ is closed to new replies.