I’ve got a small cost calculator for a website I’ve built with JQuery. At some point the person decided they wanted a WordPress website, and I’ve been having some trouble migrating it to a page. I’ve been through the WP documentation on adding Javascript but to be honest I’m still a little confused.
What I’ve done so far in migrating the website so far is take apart the default ‘twentyeleven’ theme and mess with its CSS for the design to match my websites. Otherwise the theme is untouched.
I’ve already sorted out the HTML and CSS for the app i.e it’s showing up correctly. Now I just need to get it to work.
If I’ve got these files:
jquery.min.js
quick-quote-tool.js
jquery.rollbar.min.js
jquery.mousewheel.js
query.easing.1.3.js
jquery.cookie.js
How on earth would I add them to a specific page and make my app functional again?
If you took the time, thank you for helping a noob out.
Those script calls go into the
header.php
file in your template. That file contains the beginning of the HTML document’s body.There should be no need to distinguish which pages you load these scripts on: if the web server is configured properly, the script files will be loaded only once and then cached.
Based off what little wordpress knowledge I have, I don’t know if you can add the scripts to specifically this page.
However, through the Appearance –> Editor menu, you can change the templates of either index.php or page.php to suit your needs.