Insert Headers and Footers

Insert Headers and Footers Plugin Review

“Where do I put code in the header in WordPress?”

I get this question almost every week! There are quite a few common marketing tools that make you paste code in the header of your page or your website. Google Analytics, Facebook Ads, and Amazon Affiliates just to name a few. If you’re not a very techie person, this point in your process can throw you for a serious loop. Some WordPress themes have a place in the theme options marked for header code. But your theme doesn’t have it, you might need a plugin.


Insert Headers and Footers plugin by WP Beginner

This is a very light plugin that just does one thing. Download it from the repository and install it through your WordPress dashboard. Under Settings>Insert Headers and Footers you’ll find two entry fields. The header field is for code that should be loaded as soon as the page begins to load. The Footer field is for code that should be loaded last on the page.

Most of the time you’ll put the code from your tool in the Header field so it’s loaded first when the page comes up in the reader’s browser.

Insert Headers and Footers Plugin

Plugin or Theme Fields – Which is Better?

Some theme developers purposely don’t include the Header and Footer script fields in their themes. There are a couple of reasons for this. First, they don’t want to be responsible for code in those fields that doesn’t play nice with their theme.

A second (and better) reason, is that keeping the extra code in a plugin gives you more flexibility to change your theme. If all of the code were entered through your theme, it would disappear when you redesigned your site. And since some of us (yes, I admit it) tend to redesign our websites multiple times a year… well, you can see the issue. Having the code in the plugin means it will stay in place and working no matter how many times I change my theme.


5 Responses

  1. Jenny Pim

    Kelly, you are a star I’ve been googling this for the past two days!

    • Kelly Phillips

      I’m so glad I was able to get you an answer Jenny!

  2. Shannon

    Kelly – you ALWAYS serve up just what I’m looking for! I needed to verify my YouTube account and *could not* get into the header – this solved ALL MY PROBLEMS!!

    Thank you Kelly for always having the answers I need in plain language!

    Lots of love and appreciation,

    • Kelly Phillips

      Yay! Glad you’ve got it! Verifying YouTube is HUGE so you can do those cards and annotations.

  3. Glen

    So, it’s preferable to put the tracking code in the header? It should only go in one or the other, correct? The instructions and forum dont explain this at all. Thanks for your info!