Today tutorial is about 3 Easy Way to Add Custom Code, Javascript, Script to WordPress. I know as a newbie WordPress player, we don’t even know what is javascript or custom code. When we research to customise something that we like, many tutorial tell us to add some code, but we don’t even know where to place this code. This is the problem that many people like me facing. (but obviously this is few year ago of me)

Thus, today I’m going to teach you how to Add Custom Code, Javascript, Script to WordPress and make your WordPress website to another level.

The first way is simply use a free plugins call Code Snippets to add custom code to WordPress page. Code snippets is very flexible and powerful, you also can add new coding to better organise your custom code. Simply add a name and fill in your script, the plugins will do the rest.

For people who like to add some script to header & footer, just simply download this plugins name called Header & Footer it will make WordPress add script to header or footer. Other than that, you can also add some tracking code like google analytics, facebook pixel, Google Adsense or more here, Very useful!

If you don’t like to rely on plugins, then you can try add javascript to WordPress from Function.php. Hence, here is how you can find your function.php and placing the javascript.

Go to file manager on Cpanel.You must access your Cpanel to do the editing, avoid directly edit those code in WordPress editor, because it will break your website. Find the function.php file.Path: wp-content/themes/[theThemesName]/function.php Paste the javascript code.No matter what’s writing in the functions.php files just paste the code to the bottom at the last.

Related tutorial: