How to Add Header and Footer Code in WordPress: 3 Simple & Effective Steps

Do you know? Headers are the essential part of your website, as well as your footers too.

If you are a newbie or a pro in WordPress and struggling to edit or modify your header & footer? As WordPress has not made those files easily accessible.

I know you have to add many codes snippets in your header and footer like google search console, google analytics, etc.

Don’t worry, here is the solution. I have written this ultimate guide on how you can easily add header and footer code in your WordPress.

Yes! Indeed, you don’t have to edit any code or files in WordPress. Your work will be done just with the help of a plugin. Isn’t it cool, huh?

Why Should We Use Header & Footer Plugins?

This question has been asked by me several times on social media. So I thought that why shouldn’t I answer it here.

I know many of the codes which work only on the header, and in WordPress, there are many of the themes like Genesis, MyThemeShop, ElegantThemes, etc. which allows you to add your code in the header or footer section easily through their control panel of the theme itself.

There are very few themes which offer this kind of feature. But I would suggest that you should never use your theme control panel to add header and footer as the codes you have placed are important for your website. In future, if you change your theme then your data will be deleted with your theme, and without those codes, your site may show some technical errors.

After installing a new theme, you have to place your codes again. So here, we have the solution that we can add codes again and again whenever we change our themes.

But you might be thinking that what about those themes which do not allow us to add header and footer codes in the theme itself.

Then here I will be going to show you the best, an easy and time-saving guide to add codes easily through a plugin which will be saved all the time even if you have changed your theme too.

Types Of Code Snippets

  • Verification code for Google, Bing, Yandex, etc.
  • Google Analytics Code
  • Schema Snippets
  • Verification code of webmaster
  • Any other codes…

The best thing is using an additional plugin for adding codes in header and footer, so with the help of that, you can add various codes as much as you want and without editing your theme’s files. And this plugin is best for the beginners. Just simply COPY & PASTE. Isn’t It Simple?

4 Best Plugins To Add Header & Footer

1. Insert Headers Footers

how to add footer in wordpress, how to add footer in wordpress theme, how to add html code in wordpress, how to add html to wordpress, insert headers and footers, wordpress add code to head, wordpress header, wordpress header code, wordpress headers

Insert Headers and Footers is a plugin from the most trusted company that is wpbeginner as it is the best and simple plugin to add your header and footer codes like analytics, webmaster, etc. in the mentioned section without any custom coding.

You just have to go to WordPress Dashboard → Plugins → Add New → Search “Insert Header Footer” → Install → Activate → Enjoy 🙂

Features

  • Easy To Setup
  • Simple Code Insert(Copy The Code And Paste In It)
  • You Can Add Any Code  HTML & JavaScript
  • Add Header and Footer Code

2. Header and Footer Scripts By Digital Liberation

how to add footer in wordpress, how to add footer in wordpress theme, how to add html code in wordpress, how to add html to wordpress, insert headers and footers, wordpress add code to head, wordpress header, wordpress header code, wordpress headers

This is one of the best plugins you’ll ever get for inserting custom header and footer in your WordPress and WordPress Posts. I actually use this plugin on my website and I love the easy to use panel of this plugin.

You can also use this plugin to insert custom header and footer code in every blog post and pages that make it different from other plugins. Most of the bloggers use this plugin to add custom header and footer code and also FAQ schema on their blog post and it works like a charm for them.

You just have to go to WordPress Dashboard → Plugins → Add New → Search “Header and Footer Scripts” → Install → Activate → Enjoy 🙂

Features

  • Easy to Setup & Use.
  • Simple Code Insert(Copy The Code And Paste In It)
  • Add Custom Header & Footer code in every Posts & Pages.
  • Add Header and Footer Code

3. Head & Footer Code Manager

how to add footer in wordpress, how to add footer in wordpress theme, how to add html code in wordpress, how to add html to wordpress, insert headers and footers, wordpress add code to head, wordpress header, wordpress header code, wordpress headers

A plugin from 99 robots to add code snippets above and below the content with a simple interface. You don’t have to worry about placing the code in the wrong place. Never lose your data while changing the themes. Track easily which codes are loading on your site.

You just have to go to WordPress Dashboard → Plugins → Add New → Search “Header & Footer Code Manager” → Install → Activate → Enjoy 🙂

Features

  • This plugin support custom post types
  • You can use shortcodes to place your codes anywhere in the website
  • Label every snippet to avoid confusion
  • Add unlimited scripts/codes in your page or post in free of cost

4. Header and Footer Scripts

how to add footer in wordpress, how to add footer in wordpress theme, how to add html code in wordpress, how to add html to wordpress, insert headers and footers, wordpress add code to head, wordpress header, wordpress header code, wordpress headers

Now insert any codes you want in <head> or before </body> and <footer> too with the help of this plugin. This plugin will also help you to add codes in custom post types. But the one thing it doesn’t offer that is you can’t insert PHP codes.

You just have to go to WordPress Dashboard → Plugins → Add New → Search “Headers & Footers Scripts” → Install → Activate → Enjoy 🙂

Features

  • Insert code to <head> in any post or page
  • Insert CSS and Javascript to <head>

5. Header, Footer & Post Injection

how to add footer in wordpress, how to add footer in wordpress theme, how to add html code in wordpress, how to add html to wordpress, insert headers and footers, wordpress add code to head, wordpress header, wordpress header code, wordpress headers

Why you have to install 5-10 plugins to add analytics, facebook, webmaster, etc. codes on your website when this single plugin can do it alone. Just copy-paste you’re any code, add it in this plugin, and rest the plugin will do its work.

You just have to go to WordPress Dashboard → Plugins → Add New → Search “Header Footer Post Injection” → Install → Activate → Enjoy 🙂

Features

  • This plugin is compatible with AMP
  • Well defined mobile and desktop injections
  • Native PHP enabled
  • You can separate post and page configuration

How To Use WordPress “Insert Headers Footers”

So here, I have shown the step by step process that how you can use  “insert headers footers” on your website in just a few minutes. So now a single plugin can work better than 10. So let’s get started…

Step 1

So very first, you have to log in on your website WordPress dashboard, and on the left-hand side panel, you will have a “plugin” option. You have to click on it; then you will get options like “installed plugins,” “add new,” and “plugin editor.” To add a new plugin, click on “add new.”

Step 1

Step 2

After clicking on “Add New,” you will be redirected to the plugin page where you will find tons of plugins, but we will be searching “Insert Headers Footers” with the help of the search bar, which is on the top right corner then install and active it.

Step 2 Plugin Store

As it showing already active because I have installed it and using it on my website.

Step 3

After installing, you have to again go to your WordPress dashboard, and in “settings,” you will get your plugin named with “insert headers and footers” after clicking on it, you will be redirected to the main plugin page.

Header Footer Dashboard

Now you can simply add your code by just copy and paste it here and give one line space after every code and hit the “save.” SIMPLE

Conclusion

So here you have seen that “How To Add Header & Footer in the WordPress” with the help of a plugin. I would suggest you that you should always add header and footer with the help of plugin as it saves your time and avoids confusion.

I hope this guide will help you to add headers and footers to your website easily. If you found this tutorial helpful, then don’t forget to share this article with your blogging friends and let them learn it too. “A Friend In Need, Is A Friend Indeed”

6 thoughts on “How to Add Header and Footer Code in WordPress: 3 Simple & Effective Steps”

Your email address will not be published. Required fields are marked with *.

  1. Thanks for publishing this blog. Really an informative blog. All the content and information of this blog is unique.

    Reply
  2. Great list.
    Thanks for sharing these headers and footers code plugins with us.
    These plugins help a lot in setting up analytics and similar web verification

    Reply
  3. Hey Sunny Kumar,
    Very Nice Content and useful article. It’s gonna help me a lot in my work to setup the header and footer code effectively.

    Reply
  4. I feel that is one of the so much significant info for me.

    And I am glad studying your article. But want to observation on some normal
    issues, The web site taste is perfect, the articles are actually great : D.
    Just right activity, cheers

    Reply

Leave a Comment