WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Aleksandar Urošević v1.5.8

Head & Footer Code

Easy add site-wide, category and article specific custom code before the closing </head> and </body>, or after opening <body> tag.

Head & Footer Code

The facts

Rating
5★ from 51
Active installs
100k+
Price
Free
Last updated
16 Aug 2026
Added
Aug 2015
Requires WP
5.2
Tested up to
WP 7.1
Requires PHP
5.6
Downloads
2,687,522

Our analysis

AI-assisted

The Head & Footer Code plugin allows you to add custom code snippets such as JavaScript, CSS, or HTML to your WordPress site without needing programming skills. You can insert code into the head, body, or footer sections of your site, making it suitable for tasks like site verification, tracking, and custom styling.

You access the plugin through the WordPress Dashboard under Tools → Head & Footer Code. It supports various code snippets for services like Google Analytics and Facebook Pixel, and allows for article-specific or category-specific code insertion.

Best for: This plugin is suitable for website owners who need to add custom code snippets for tracking or styling without coding experience.

What it does well

  • Free to use from the WordPress.org directory
  • Supports various code snippets for popular tracking services
  • User-friendly interface for adding code without programming knowledge
  • Allows for article-specific and category-specific code
  • Regularly updated with a high directory score

Where it falls short

  • No information on advanced features or limitations
  • Other taxonomies do not have specific code options

Verdict

Head & Footer Code is a straightforward solution for adding custom code to your WordPress site, ideal for users looking to implement tracking or verification codes easily.

From the developer

Aleksandar Urošević's own description of Head & Footer Code, lightly tidied.

Head & Footer Code plugin helps you add custom code snippets (JavaScript, CSS, or HTML) to the page even if you are not a programmer. It could be within the <head> (site verification code for various services, custom styles, meta or Webfont link), right after opening <body> (pixel tracking, analytics or heatmap code) or just before closing </body> tag.

Go to ToolsHead & Footer Code in WordPress Dashboard. Insert custom code to HEAD, BODY or FOOTER section (depending on what you have to do).

All magic is done by hooking to WordPress hooks wp_head, wp_footer and wp_body_open.

💡 Trial Head & Footer Code plugin on a free dummy website before you add it on your project: Test It Now!

Various code snippets are supported, including but not limited to:

  • Google Analytics 4
  • Google Tag Manager
  • Google Ads Conversion
  • Lite Analytics
  • Facebook/Meta Pixel
  • Hotjar
  • FullStory
  • Google site verification
  • Bing site verification
  • Yandex site verification
  • Alexa site verification

Homepage in Blog Posts mode

If your WordPress shows the latest blog posts on the homepage, you can also add specific code only for the homepage on ToolsHead & Footer Code (there will be section Head, body and footer code on Homepage in Blog Posts mode)

Article specific code

To insert custom code specific for individual article (post, page or custom post type), use article-specific Metabox while editing post/page/custom post type (check out Screenshots). There choose if that specific code appends to site-wide code defined on ToolsHead & Footer Code, or to replace it.

Category specific code

You can also define a Category specific code on each individual category.

Other taxonomies (tag and custom taxonomy) do not have available their specific code, but for them a Global code is used instead.

Video guide

Do you need our support?

If Head & Footer Code does not work on your project, please let us know by raising a new support ticket in the Community Forum and describe what does not works and how to reproduce the issue. We will make sure to resolve the issue as soon as possible.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for measuring traffic.

Under Construction

Easy to use Under Construction Page &amp; Coming Soon Page. Enable Under Construction Mode in seconds &amp; sh...

Free 600k+ installs 4.8★ (1,285)
Ad Inserter

Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...

Free 300k+ installs 4.9★ (2,428)
MonsterInsights

The best free Google Analytics plugin for WordPress. See how visitors find and use your website so you can gro...

Free 2M+ installs 4.5★ (3,148)
Maintenance

Great looking maintenance, coming soon &amp; under construction pages. Put your site under maintenance in minu...

Free 1M+ installs 4.4★ (860)
Header Footer Code Manager

Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for an...

Free 600k+ installs 4.9★ (309)
GA Google Analytics

Adds Google Analytics tracking code to your WordPress site. Supports many tracking features.

Free 400k+ installs 4.9★ (158)