The easiest way to add a Javascript file to WordPress is using the Insert Headers and Footers plugin.  Log in to your site's and install Headers and Footers plugin. Once it has installed, click on Activate Save your JavaScript code or file into a new file with the .js extension. Upload it into your site to the following folder: wp-content/themes//js/ Go to Settings > Insert Headers and Footers. Add the following to the Scripts in Header: