1. Use plugin Code Snippets – add custom code to WordPress Page
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!
- 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
- How To Get Post Featured Image URL In WordPress
- How to set Html lang attribute in WordPress
- How to Change WordPress Password Protected Text without Plugins Custom for Every Page
- How to Display Last Updated Date Posts In WordPress (Stepbystep)
- How to Get Custom Field Value in WordPress (Display WordPress Custom Fields)