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

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

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

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 code 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, why shouldn’t I answer it here?

I know many of the codes that work only on the header, and in WordPress, there are many themes like Genesis, MyThemeShop, ElegantThemes, etc., which allow 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 that 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 the 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, what about those themes that 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 the header and footer, so with the help of that, you can add as many codes as much as you want without editing your theme’s files. This plugin is best for 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 simplest 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 headers and footers 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 codes in every blog post and page, which make it different from other plugins. Most bloggers use this plugin to add custom header and footer code and also FAQ schema on their blog posts, 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 set and use.
  • Simple Code Insert(Copy The Code And Paste In It)
  • Add Custom Header & Footer code on every Posts & Page.
  • 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 supports custom post types
  • You can use shortcodes to place your codes anywhere on the website
  • Label every snippet to avoid confusion
  • Add unlimited scripts/codes to your page or post 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 copying and pasting it here, and giving one line space after every code. Then, hit “save.” Simple.

Conclusion

So, you’ve learned how to add a header and footer to your WordPress website using a plugin. I recommend using a plugin to save time and avoid confusion when adding headers and footers.

I hope this guide helps you easily add headers and footers to your website. If you found this tutorial helpful, please share it with your blogging friends so they can learn too. Remember, “A Friend In Need, Is A Friend Indeed.”

Avatar of Sunny Kumar
Sunny Kumar
Hello! I’m Sunny Kumar from New Delhi, India, a tech enthusiast and blogger with an IT degree from IIT-D. My expertise lies in SEO, Cloud Computing, Telecom & Networking, and CEH. I specialize in SEO, WordPress Development, and PC Building. And being a proficient WordPress user, I’m dedicated to delivering quality content and a remarkable user experience.

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

  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
  5. Fantastic guide! I found the step-by-step process extremely helpful. The plugin recommendations are also valuable. Now adding header and footer codes in WordPress won’t be a struggle anymore.

    Reply

Leave a Comment