- Login To Your WordPress Dashboard (/WP-ADMIN)
- Got To Plugins > “Add New”
- Click “Install Now”
- Then Click “Activate”
- Now you can use the plugin
The plugin can be extremely helpful for developers and veteran WordPress users. However, if you are completely new to the CMS and also never have done any coding beforehand, then we encourage you to go through our in-depth guide on the topic. There we share a step by step guide to help you easily add JS to your website.
Click on the Install button followed by Activate, and the plugin will install on your site.
Once installed, you will notice a Custom CSS & JS option in the sidebar of your WordPress dashboard. Click on it to access the following area.
As you can see, this is very much similar to the “All Posts” and “All Pages” sections of your WordPress backend. You will be presented with a list of all the custom codes you have written, saved, and published on your site.
As you can see from the image, you will get access to a powerful Text Editor complete with a syntax highlighter. You can either start writing your custom JS code here, or copy paste it from another source.
To the side you will notice there are options which allows you to print the code inline or include it into an external file. You can also specify if you want to print the code in the header, footer, Frontend, Admin page, or on the login page.
That’s a lot of options! And if you want a more, a pro version is also available which gives you more controls and flexibility.
Related Questions From Users:
So with this tool at your disposal you can do a lot of cool complicated things without actually slowing down your Website load speed (keep in Google good graces).
How Do I Embed A JS File In WordPress?
- Add a script into select pages using a plugin such as Headers and Footers
- Use functions.php to add it as part of the template’s output
When it comes to JS it is just not always so especially when it is coded poorly. Google needs to be able to not only crawl your Website but also render and digest it all that’s why it needs to be as clean as possible.
Use where it is need to give your users the best experience the can have just be weary of any errors it may cause to your SEO.
Hello my name is Hunter Raymond. I have a degree in Information Technology with a concentration in Web Development. Which honestly doesn’t mean much in today’s world which is why I switched to WordPress because it makes most everything easier especially if you aren’t a Web Developer. I haven’t looked back since