Header Footer Script Adder – Insert Code in Header, Body & Footer
Easily add custom scripts and code to your WordPress site’s header, body, or footer. Perfect for Google Analytics, Tag Manager, pixels, meta tags, cus …
Plugin info
Maintenance & Compatibility
Maintenance score
Actively maintained • Last updated 58 days ago • 5 reviews
Is Header Footer Script Adder – Insert Code in Header, Body & Footer abandoned?
Likely maintained (last update 58 days ago).
Compatibility
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Description
Header Footer Script Adder is a powerful and user-friendly WordPress plugin that lets you easily insert custom HTML, CSS, and JavaScript into your site’s header, body, or footer.
You don’t need to edit theme files or worry about losing your code after updates. This plugin keeps your scripts safe, reusable, and flexible with conditional loading and per-page overrides.
✨ Features
- Add scripts to Header (
), Body (after), or Footer (before) - Conditional Loading – load scripts sitewide, homepage only, posts/pages, or archives
- Per-Page Overrides – add unique code for specific posts and pages
- Code Editor with Syntax Highlighting (CodeMirror)
- Safe Input Handling – sanitization without breaking valid HTML, CSS, or JS
- Lightweight and Fast – minimal database queries
- Block Editor & Classic Editor Compatible
- Multisite Ready & Translation Ready
✅ Perfect For
- Google Analytics / GA4 tracking code
- Google Tag Manager
- Facebook Pixel and ad tracking
- Chat widgets (WhatsApp, Crisp, Tawk.to, etc.)
- Custom CSS and JavaScript
- SEO and verification meta tags (Google, Bing, Pinterest)
- A/B testing scripts
- External fonts and resources
⚙️ Conditional Loading Options
- Sitewide (all pages)
- Homepage only
- Posts & Pages only
- Archive pages
🔒 Security & Performance
- Sanitized input to prevent malicious injections
- Nonce verification for safe form submissions
- Admin-only access for configuration
- Clean uninstall process (no leftover data)
- Minimal performance impact
👨💻 Developer Friendly
- Extensible, documented code
- WordPress coding standards compliant
- Translation-ready
.potfile included - Works with any theme
Donations
If you enjoy this plugin and want to support development, you can buy me a coffee:
👉 https://www.buymeacoffee.com/mahethekiller
Support & Documentation
For support, feature requests, or documentation, please visit the support forum on WordPress.org.
Privacy Policy
This plugin does not collect or share personal data. It only loads the scripts you provide.
Any data collection depends on the external scripts you choose to add (e.g., Google Analytics, Facebook Pixel, chat widgets).
Installation
- Upload the plugin folder to
/wp-content/plugins/or install via the WordPress dashboard. - Activate the plugin from Plugins Installed Plugins.
- Go to Header Footer Script Adder in your admin menu.
- Paste your scripts and configure loading conditions.
- Save settings and done!
Manual Installation
- Download the plugin
.zip. - In WordPress Admin Plugins Add New Upload Plugin, select the zip file.
- Install and activate.
- Configure from Settings Header Footer Script Adder.
Frequently Asked Questions
Yes. Input is sanitized, and only admins can add or edit scripts. It follows WordPress security best practices.
No. It’s lightweight and optimized. Scripts only load where needed.
Yes. Use the per-page overrides in the post/page editor.
Yes. Works with both Gutenberg and Classic Editor.
Yes. Each site can have its own configuration.
Yes. You can add multiple scripts in header, body, and footer.
Yes. Code is stored in the database, not in theme files.
When uninstalling, you’ll have the option to remove all saved scripts from your database.
Yes. The plugin supports any valid HTML, CSS, or JavaScript code.
Review feed
Changelog
1.0.0
- Initial release.
1.2.0
- Added new features and bug fixes.
- Improved UI for easier code management.
2.0.3
- Major release.
- Added global header, body, and footer script support.
- Conditional loading (sitewide, homepage, posts, archives).
- Per-page script overrides.
- Integrated CodeMirror editor.
- Improved sanitization and security.
- Block Editor and Classic Editor compatibility.
- Performance optimizations.
- Updated documentation.

