Do you know? how to
- Create and Edit WordPress htaccess file – In two Simple Steps
- Leverage Browser Caching Google Analytics
</body> tag. Read the instructions given below to use this script.
Don’t forget to take a complete back-up before making any changes in the code. If something went wrong, you can use that back-up to go back.
- Copy the code and paste it in HTML file just before the
</body>tag (near the bottom of HTML file).
- Save changes. And you are done.
- Finally, test your website again to see the effect.
If you want to defer multiple scripts in one go. You can use the same script with little modification. In the following code replace defer1.js, defer3.js, and defer3.js etc. with the link of scripts which you want to defer.
- Using WordPress Plugins (with plugin)
- Using the Script mentioned above (without plugin method)
- Speed Booster Pack
- W3 Total Cache
In WordPress, the code mentioned above can be placed in HTML file just before the
</body> tag using hook content option.
Most of the popular WordPress themes come with hook content provision. If you are not using hook content option or it is not available in your theme. Then, either you can use a WordPress plugin to add script in WordPress footer before
</body> tag or you can place the script in the footer file just before the
</body> tag manually.
Facing any difficulty adding the script in WordPress footer? Check out our detailed guide, to learn how to add code in WordPress header and footer easily.
Wrapping it up