Easy add site-wide, category and article specific custom code before the closing </head> and </body>, or after opening <body> tag.
As of April 2026, Head & Footer Code is a WordPress body plugin with 100K+ active installations and a 5/5 rating from 52 reviews. It has been downloaded 2.5M+ times in total. Requires WordPress 5.2+ and PHP 5.6+. Available on WordPress.org since 2015. Actively maintained — updated within the last month. Download volume is stable this week. Support resolution rate: 80%. Top alternative: Custom Body Class.
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 Tools → Head & 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:
Have used this plug-in reliably for years. Found a bug in the most recent version, reported it, and had it fixed within a few hours. Love that!
Thank you, you deserve 10 stars.
I’ve been using this plugin for around two to three years now across three different sites I use to run my creative projects as a small-time writer. Of these sites, one is a writing and blogging page, and the other serves as a short link for social media sharing. I rely on being able to build accurate rich previews using meta tags, so when I share on social media, the correct information is supplied.
This plugin allows me to edit the header codes for each page and post directly by a simple custom box at the bottom of each editing page. Simple to use and set up with the settings provided, I can fine-tune each rich preview and schema document to the specifics for each new piece I create to help drive traffic to my site and improve my SEO (which I prefer to manage on my own terms).
I’ve relied on this plugin for so long that nothing else can replace it. It’s simple, tidy, and non-intrusive, which are highlights of this plugin. The user interface aligns with the WordPress back-end theme, is clear and easy to understand, and offers seamless integration with my workflow. In the instances where I’ve had to reach out for support, I’ve had a great experience working with the plugin author to resolve any issues that have occurred, which is a credit to their work and development.
Overall, if you need a straightforward, does-what-it-says-on-the-tin plugin to allow for customization of your header/footer coding for individual pages and posts (as well as globally to your site, if you need to add in Google Analytics or other coding to your site/project in general), this plugin is highly recommended.
Thank you for your continued development of this plugin, and for the work that you do!
I have been using this plugin over many years, and it is absolutely great! 🙂
I once signaled a bug to the developer, and it was fixed within an hour! Thank you!
Thank you for your great plugin. Also for handling the forum topic and fixing a small problem with new WordPress 6.7 version.
| WordPress | 5.2+ requiredTested up to 7.0 |
| PHP | 5.6+ required |
set_time_limit from update.php to prevent fatal error on servers where it’s disabledPlugin data sourced from WordPress.org. Analysis and metrics by PluginSift.