How to add a code to the theme header or footer

We do not recommend the alteration of the theme files. This can cause malfunctions and can break the theme functionalities. If need to make code customizations, the Child themes are the recommended way of modifying an existing theme.

If you are not a developer and you're are not familiar with deep theme customization using the child theme, or you are simply looking for a small task as adding Facebook pixel code to the header theme or something similar:

Follow the next steps to add a code to the theme header without touching the code.

 1
Install a dedicated WordPress plugin which helps you to add codes to the theme header. In this example we will use this plugin:  Insert Headers and Footers.
2
Go to WP Admin > Settings > Insert Headers and Footers
3
Save.

Javascript conflict

After saving the plugin options, visit a page and check the Live Composer usage. If there are JS errors mentioned with the ladybug tool, means your script code added cause malfunctions. Check for more details this article:  Troubleshooting: JavaScript error detected

Still need help? Contact Us Contact Us