Most of the new bloggers whose blog is on WordPress and they use free themes, due to which editing of themes is not allowed in their theme, in such a situation, they get into thinking how to put the code in the header, apart from this if they do not know about editing.
Read More: How to Fix Missing Gravatar Alt Tag Value in WordPress
If so, they find a way to embed the code without editing the theme, if you have the same question, then don’t worry, you just read this post, you can easily put any code in WordPress without a theme.
Here you will learn to add headers and footers through plugins, although there are many plugins, I am telling you about a plugin here because there are many plugins that are not updated from time to time, using which the site will get errors. That’s why it’s important to choose the right plugin.
Add Code Header and Footer in WordPress
Method – 2
If you want to insert code in WordPress without editing the theme, then first of all install the plugin mentioned below.
|Plugin Name||Insert Headers and Footers|
Once the plugin is installed, simply click on setting
Now you will have 3 boxes in front of you, you have to paste the code in the header, so save it by entering the code in the first box.
Similarly, if you want to add any code in the footer, then save it by entering the code in the box below, here you can add as many codes as you want in the header and footer, there is no limit.
Method – 2
If you want to add code in the header footer inside the theme, then follow the below steps for that.
- Open WordPress Dashboard and click on Appearance then click on Theme Editor
- Now here you have to add code in the Header, so click on Header.php File here
- Now the full coding of the Header.php file will be open
- Here you can paste the code anywhere in front of you, remember one thing whatever code you want to add is < head>
You have to put the code inside itself, after that click on the update file, it is done add the code in the header, in this way you can put any code which is to be put in the header section like this.
Theme Footer Editing
You have to follow all the processes as above, but you have to change a little. To add the Footer me Code, you have to open the Footer.php file and scroll, after that, you have to update the file by putting the code above the last me.
In this way, you can put any code in WordPress Header and footer Hope you liked this post Add Code Header and Footer in WordPress. If you have any questions related to the post then you can ask through comments if you liked the post then social sites do share it.
2 thoughts on “How to Add Code Header and Footer in WordPress”
Great Information Sir