Header and Footer Scripts
Header and Footer Scripts plugin allows you to add scripts to WordPress site's and just before closing tag.
Use with caution
Header and Footer Scripts works, but test it on a staging site before relying on it in 2026. It runs on 200K+ sites, is rated 4.6/5 and was last updated 10 months ago, and scores 51/100 on our health check.
- Proven at scale on 200K+ active sites
- Loved by users — 4.6/5 from 58 reviews
- Only tested up to WordPress 6.9 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Header and Footer Scripts stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| footer | #9 |
| head | #17 |
| header | #10 |
| post | >100 |
| scripts | #2 |
Version adoption
Share of active sites per release.
Rating breakdown
★★★★★★★★★★ 4.6 from 58 reviews
About Header and Footer Scripts
From the official readme · v2.4.2Description
An essential WordPress plugin to easily insert scripts and styles (like Google Analytics, CSS, etc.) into your website’s header and footer.
Looking for a way to add Google Analytics, Facebook Pixel, or custom tracking code to your website’s header or footer?
Header and Footer Scripts is a simple yet powerful plugin that lets you inject code—such as Google Analytics, custom CSS, Facebook Pixel, and chat widgets—directly into your site’s header (<head>) or footer.
No bloat, no ads. This lightweight plugin simply does what it says: inserts code into your header and footer efficiently.
All you have to do is add the appropriate HTML code.
Don’t forget to wrap your code with proper tags.
<script type="text/javascript">
YOUR JS CODE HERE
</script>
Or for CSS:
<style type="text/css">
YOUR CSS CODE HERE
</style>
Why use this plugin:
- Insert scripts globally into the header and footer of your entire website.
- Supports all script types including HTML, JavaScript, and CSS.
- Add specific scripts to the header of individual posts or pages.
- To insert code to Custom Post Type [New Feature].
The plugin should be compatible with WooCommerce.
What it does not offer
- You can’t insert/execute PHP codes.
Almost all WordPress themes support this “Header and Footer Scripts” plugin. If the codes are not appearing in your site [ask for support] or look at your theme file if they have standard wp_head and wp_footer hooks.
Important Links
For further information you are welcomed to follow these links:
Installation
There is nothing special about installation of this plugin. It is as simple as uploading the plugin files to your plugins directory.
Upload the plugin to /wp-content/plugins and activate. OR Search “Header and Footer Scripts” from WP Dashbard --> Plugins --> Add New then hit Install and then activate.
Once the plugin is activated you will see “Header and Footer Scripts” menu item under settings of WordPress dashboard. Also a meta box on Post and Page edit page.
Changelog
Upgrade for more functionality and bug fixes.
2.4.2
- Fix: Resolved critical issue where scripts added to per-post meta box were not saving.
- Fix: Corrected CodeMirror editor rendering (borders, height) and gutter visibility (line numbers) in meta box.
- Improvement: Updated English copy throughout the plugin for better clarity and professionalism.
- New: Added Hindi (hi_IN) translation.
- New: Included language template (.pot) and translation files.
2.4.1
- New Feature: Added “Clean on Uninstall” option to allow users to remove all data upon deletion.
- Fix: Resolved issue where sidebar was not loading on settings page due to deprecated constant.
- Improvement: Enhanced WPCS compliance with comprehensive DocBlocks and formatting fixes.
- Improvement: Added strict sanitization to settings authentication to resolve Plugin Check warnings.
2.4.0
- Internal: Refactored codebase to “Jamify HFS” naming standards (
jamify_hfs_prefix) while maintaining full backward compatibility. - New Feature: Added support for wp_body_open hook to insert scripts immediately after body tag.
- New Feature: Added Syntax Highlighting for script editors in settings page.
- Improvement: Modernized permission system to use ‘unfiltered_html’ capability.
- Improvement: Added settings to allow Authors and Contributors to add scripts.
- Improvement: Added admin notice for backward compatibility migration.
2.3.1
- Security: Hardened nonce implementation with static action names.
- Security: Added strict sanitization for access level settings.
- Security: Improved input validation with isset() checks and wp_unslash().
- Security: Replaced FILE menu slug to prevent path exposure.
- Security: Added security warning for privilege delegation.
- New: Added uninstall.php for clean database removal.
- Fix: Added proper ABSPATH checks to all files.
- Improvement: Added phpcs:ignore comments for intentional raw output.
2.3.0
- Fix: Stored Cross-Site Scripting (XSS) vulnerability.
- New Feature: Add minimum capability required to add scripts to posts.
2.2.1
- Updated readme.txt.
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best Header and Footer Scripts alternatives
All footer plugins →FAQ
Header and Footer Scripts: quick answers
Straight answers, pulled from live WordPress.org data.
Live data from WordPress.org · checked Nov 16, 2026
Is Header and Footer Scripts free?
Yes. Header and Footer Scripts is free to download and use from the official WordPress.org plugin directory.
Is Header and Footer Scripts safe to use in 2026?
Header and Footer Scripts works, but test it on a staging site before relying on it in 2026. It runs on 200K+ sites, is rated 4.6/5 and was last updated 10 months ago, and scores 51/100 on our health check.
How many websites use Header and Footer Scripts?
Header and Footer Scripts is active on 200K+ WordPress websites and has been downloaded 1,759,710 times since it launched in February 2014. It was downloaded 12,514 times in the last 30 days.
Does Header and Footer Scripts work with WordPress 7.1?
Header and Footer Scripts is officially tested up to WordPress 6.9.11, while the latest release is 7.1.4. It may still work, but try it on a staging site first.
What PHP version does Header and Footer Scripts need?
Header and Footer Scripts requires PHP 5.6 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Header and Footer Scripts last updated?
The latest version, 2.4.2, was released on February 1, 2026 (10 months ago).
Who makes Header and Footer Scripts?
Header and Footer Scripts is developed and maintained by Anand Kumar.
What are the best alternatives to Header and Footer Scripts?
The most popular alternatives to Header and Footer Scripts are Header Footer Code Manager (600K+ installs), Insert Headers And Footers (200K+ installs) and Head, Footer and Post Injec… (200K+ installs).
Powered by PageForge
Want thousands of pages that rank like these? Build them in an afternoon.
This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.
- CSV, Google Sheets & API data sources
- AI content, schema & internal links per page
- Works with Elementor, Gutenberg, Yoast & Rank Math
- Free on WordPress.org — no credit card

![This box will appear below the compose box on posts and pages. If not please refer to [our docs][4] if it's not there.](https://ps.w.org/header-and-footer-scripts/assets/Screenshot-2.png?rev=861488)