HOW TO EASILY INSTALL AND SET UP 'INSERT HEADER AND FOOTER' PLUGIN TO WORDPRESS IN 2019

Опубликовано: 04 Апрель 2026
на канале: Md Lutful Huda
93
1

HOW TO EASILY INSTALL AND SET UP 'INSERT HEADER AND FOOTER' PLUGIN TO WORDPRESS IN 2019

While some theme frameworks like Genesis have a built-in option for quickly adding code and scripts to your WordPress header or footer, we here at WPBeginner have worked on numerous sites and custom themes where this functionality doesn’t exist. Most users, however, will certainly want to add some sort of meta information or Google Analytics to their WordPress blog at some point. To solve this problem, and empower the users, we use a custom plugin on our sites called Insert Headers and Footers for WordPress. Not only is it extremely simple and easy to use without a bunch of confusing options, the biggest advantage is that instead of having to use a dozen different plugins to add various scripts and meta tags to your header or footer you can just add them all in one spot. In this tutorial we are going to show you how to insert code to you WordPress header or footer using this simple plugin.
First, download and install Insert Headers and Footers for WordPress. Now go to Settings - Insert Headers and Footers.
EASILY INSERT HEADER AND FOOTER CODE
Insert Headers and Footers is a simple plugin that lets you insert code like Google Analytics, custom CSS, Facebook Pixel, and more to your WordPress site header and footer. No need to edit your theme files!
The simple interface of the Insert Headers and Footers plugin gives you one place where you can insert scripts, rather than dealing with dozens of different plugins.
FEATURES OF INSERT HEADERS AND FOOTERS
Quick to set up
Simple to insert scripts
Insert header code and/or footer code
Add Google Analytics code to any theme
Add custom CSS across themes
Insert Facebook pixel code
Insert any code or script, including HTML and Javascript
CREDITS
This plugin is created by Syed Balkhi and the WPBeginner team.
WHAT’S NEXT
If you find this plugin useful to insert header and footer scripts, please leave a good rating and consider checking out our other projects:
OptinMonster – Get More Email Subscribers
WPForms – Best Contact Form Builder Plugin
MonsterInsights – Best Google Analytics Plugin
To learn more about WordPress, you can also visit WPBeginner for tutorials on topics like:
WordPress Speed and Performance
WordPress Security
WordPress SEO
…and many more WordPress tutorials.
NOTES
Insert Headers and Footers is the easiest way to insert code in your WordPress headers and footers.
What Is Insert Headers and Footers?
Insert Headers and Footers is a free plugin by WPBeginner that allows you to add insert code into your header and footer throughout your whole website. The code can be easily added and edited right from your WordPress dashboard.

Without a plugin like Insert Headers and Footers, you would have to manually edit your header.php and footer.php theme files if you wanted to add any code. Using Insert Headers and Footers instead has a lot of advantages. Insert Headers and Footers:
Is faster: No need to find the right theme file and spend time hunting through code to figure out where to add your own.
Prevents errors: It’s easy to delete the wrong thing or place code in the wrong place when editing theme files, but a plugin can prevent that.
Preserves your changes: When your theme updates, you’ll lose any changes you made to the files. Keeping your code separate in a plugin will prevent this.
Keeps you organized: You can see in your WordPress dashboard at a glance what code and scripts you’ve added to your header and footer.
What Kind of Code Goes in Your Header or Footer?
Certain code snippets must be placed in specific locations on your site in order to work correctly. While many plugins will add code for you automatically, you may want to manually do things like enable Twitter cards, add Facebook author tags, or add your site to Google Search Console.
If you use Google Analytics on your site, you should place the provided tracking code in the header. Because it’s asynchronous, it won’t affect your page loading times, and placing it in the header provides more accurate statistics. If you want to add other Javascript code to your site, it’s often best to place it in the footer so it doesn’t slow down the loading of your site.