By default, WordPress lacks any inbuilt solution to add code snippets to your WordPress site’s header and footer area. However, this is a very simple problem that can be easily solved using a WordPress plugin. And so, for the purpose of this read, we will be looking at the top 5 WordPress plugins that can help you insert code to headers and footers on your website.

But first,

Why Would I Need To Insert Code to Headers and Footers of my WordPress website?

Many tools and tracking scripts only function if you add the corresponding code snippet to your WordPress site’s header or footer area; Google Analytics being a prime example for such services. Since WordPress lacks any native solution to help you add the code snippets, you need to install these plugins to take care of the job.

It is worth mentioning that there is an alternative method to insert code to header and footers to your WordPress site, and that is by making direct tweaks to the core functions.php file. This method can be somewhat cumbersome for beginners and non-tech-savvy users. Whereas, using a plugin is the far simpler and better means to handle the task.

Now with all questions answered, let’s dive into our full list of the Top 5 WordPress Plugins To Insert Code To Headers and Footers:

Top plugins for inserting code to headers and footers

1. Insert Headers and Footers

Download

Insert Headers and Footers plugin for wordpress

For the first plugin on your list, we have Insert Header and Footer for WordPress from the people over at WPBeginner. It is a very simple and user-friendly plugin which allows you to easily insert code snippets for integrating services like Google Analytics, Facebook Pixel, and even Custom CSS.

With the plugin activated on your WordPress website, it will create a section in your site’s backend, with dedicated areas for header and footer. You can insert your code snippet into this area, click save, and it will automatically be updated under your site’s <head> section and <body> section.

Features:

  • Lightweight with a super simple interface.
  • Integrates backend section to insert code to headers and footers.
  • Compatible with all WordPress themes.
  • Allows you to add code snippets for Google Analytics and Facebook Pixel.
  • You can also add custom scripts for HTML, CSS, and Javascript.

2. Woody Ad Snippets

Download

Woody Ad Snippets plugin in wordpress

Woody Ad Snippets WordPress plugin helps you add a special library accessible from the admin sidebar. Here you can create and store code snippets and even duplicated text. The plugin comes with inbuilt support for shortcodes to add code snippets almost anywhere on your website. You can even add them automatically by using the header, footer, and post injections.

The plugin adds a Woody Snippets custom post type. You can now access it similar to how you access your site’s pages and posts. Option to “Add New” Woody Snippet will open the WordPress editor where you can paste the code you intend to use on your site. There is also a dedicated section which allows you to specify where you want the code to run.

Features:

  • A powerful Header Footer code manager.
  • Create and store a potentially unlimited number of code snippets.
  • Integrates a user-friendly code editor with support for syntax highlighting.
  • Option to create rich Text ads using the TinyMCE WordPress editor.
  • Also comes with special blocks to help you add code snippets using Gutenberg editor.
  • Option to show or hide code snippets based on conditional logic.
  • Helps Insert Code To Headers and Footers using shortcodes.

And much more.

3. Insert Code by Angie Makes

Download

Insert Code by Angie Makes

Much like some of the other WordPress plugins in the list, Insert Code by Angie Makes also integrates a dedicated section in your WordPress backend for copy-pasting code snippets. You will get a dedicated area for entering your headers code followed by a dedicated area to enter your footer code. Once inserted, click save, and the code will be applied on your WordPress site.

Besides this, the plugin also allows you to add different theme support on your site to help you insert custom code including HTML, JavaScript, and CSS, for all your desired tweaks. You also get support to add the code at the top of your pages, above header, below header, above content, or below content.

Note: The plugin has not been updated last updated in 2017 and has been only tested up till WordPress v.4.7.13.

Features:

  • Simple and easy to use.
  • Allows insertion of custom code snippets including HTML, CSS, and JavaScript.
  • Option to add theme support to enable code insertion in different parts of the theme.

4. Header and Footer Scripts

Download

Header and Footer Scripts plugin in wordpress

Header and Footer Scripts WordPress plugin allows you to insert and save codes as custom post types on your site. You can practically insert any type of code from Google Analytics to Custom CSS stylesheets.

However, you will have to add the appropriate HTML tag to the code in order to function properly.

Features:

  • Allows you to insert any type of code as custom post types on your website.

5. AddFunc Head & Footer Code

Download

AddFunc Head _ Footer Code plugin in wordpress

And now for the final plugin on our list for helping you insert code to headers and footers in WordPress, we have AddFunc Head & Footer Code. The plugin sports a simple and intuitive UI with dedicated fields for adding code snippets to your website. You can choose to add the code to your header, footer, individual posts, or even site-wide.

As such it also delivers a bit more flexibility compared to other plugins in terms of code insertion options. The plugin is perfect for adding Google Analytics conversion tracking code or any page-specific JavaScript to your site.

Features:

  • Simple and easy to use UI.
  • Gives you the option to add code snippets to your headers, footers, individual site, or even site-wide.

In Conclusion

Now, these were our picks for the 5 best WordPress Plugins To Insert Code To Headers and Footers. As you can see, all the plugin comes with a super intuitive layout that allows you to easily add code snippets to your header and footer area. Even if you are a beginner with no coding experience, the plugin can offer tremendous help and make your job as easy as simple copy-pasting.

Now you are all set to insert PHP code snippets into your WordPress site without coding.