To add code to your site’s header, you need to paste it into one of the boxes under the SECTION INJECTION area: But for this guide, you’ll mostly work in the default Head and footer tab: Head, Footer and Post Injections interface You’ll see a number of tabs in the plugin’s interface. Once you activate the plugin, you can access its interface by going to Settings → Header and Footer in your WordPress dashboard.
Head, Footer and Post Injections is available for free at, so you can install and activate it directly from your WordPress dashboard by going to Plugins → Add New and searching for it: Install the plugin Step 2: Add Code Snippet to Head, Footer and Post Injections Header and Footer WordPress plugin Step 1: Install and Activate Head, Footer and Post Injections It currently has over 200,000 active installs with a 5 out of 5-star rating. While there are several plugins that offer this functionality, we recommend the Head, Footer and Post Injections plugin from Stefano Lissa because it gives you more control than many of the alternatives. The plugin is more beginner-friendly because it doesn’t require digging into the code.The plugin makes it easy to only add code snippets to the header or footer of your homepage, which can be helpful in some use cases.Your code snippets will remain intact if you ever switch themes.The benefits of using a plugin over the manual method in the next section are:
How to Add Code to WordPress Header and Footer With a Pluginįor most users, the easiest way to add code to the WordPress header and footer is via a plugin. How to Manually Add Code to WordPress Header and Footer.How to Add Code to WordPress Header and Footer With a Plugin.You can click the links below to jump straight to your preferred method: But intermediate-advanced WordPress users may prefer using the manual code method, instead. For most users, the plugin method is the recommended method. In this entry, we’ll show you how to add code to the WordPress header or footer both by using a WordPress plugin or manually adding the code to your functions.php file. Discover how Kinsta customers are seeing up to a 200% increase in performance.