Header Footer Script Adder – Insert Code in Header, Body & Footer Icon

Header Footer Script Adder – Insert Code in Header, Body & Footer

By mahethekiller

Active Installs

1,000+

Last Updated

June 17, 2026

First Released

February 2, 2017

Download History (Last one month)


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 (<head>), Body (after <body>), or Footer (before </body>)
  • 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 .pot file 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).

  1. Upload the plugin folder to /wp-content/plugins/ or install via the WordPress dashboard.
  2. Activate the plugin from Plugins Installed Plugins.
  3. Go to Header Footer Script Adder in your admin menu.
  4. Paste your scripts and configure loading conditions.
  5. Save settings and done!

Manual Installation

  1. Download the plugin .zip.
  2. In WordPress Admin Plugins Add New Upload Plugin, select the zip file.
  3. Install and activate.
  4. Configure from Settings Header Footer Script Adder.
Is this plugin safe to use?

Yes. Input is sanitized, and only admins can add or edit scripts. It follows WordPress security best practices.

Will it slow down my website?

No. It’s lightweight and optimized. Scripts only load where needed.

Can I add scripts to specific pages only?

Yes. Use the per-page overrides in the post/page editor.

Does it support Gutenberg (Block Editor)?

Yes. Works with both Gutenberg and Classic Editor.

Can I use it on multisite?

Yes. Each site can have its own configuration.

Can I add both Google Analytics and Facebook Pixel together?

Yes. You can add multiple scripts in header, body, and footer.

Will my scripts stay if I switch themes?

Yes. Code is stored in the database, not in theme files.

How do I remove plugin data completely?

When uninstalling, you’ll have the option to remove all saved scripts from your database.

Can I insert chat widgets or meta tags?

Yes. The plugin supports any valid HTML, CSS, or JavaScript code.

Changelog

2.1

  • Added in-dashboard Affiliate Program page with seamless Google Form integration.
  • Improved dashboard visibility for the affiliate program and upgraded menus.

2.0.7

  • Converted plugin architecture to a unified Single Version Model.
  • Integrated Freemius SDK for secure premium features delivery.
  • Added Pro Version upgrade dashboard and conditionally-loaded premium code structure.
  • Verified compatibility with latest WordPress version 6.5.

2.0.6

  • Fixed a few security issues.

2.0.5

  • Minor bug fixes and improvements.

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.

1.2.0

  • Added new features and bug fixes.
  • Improved UI for easier code management.

1.0.0

  • Initial release.
<br />
<b>Warning</b>:  Undefined array key /home/ylinkin/truewp.net/wp-content/plugins/truewp-plugin-info/truewp-plugin-info.php on line 756
" width="120" height="120">

Available Versions

Version Download Type
2.1 Download Stable
2.0.7 Download Stable
2.0.6 Download Stable
2.0.5 Download Stable
2.0.4 Download Stable
2.0.3 Download Stable
2.0.2 Download Stable
2.0.1 Download Stable
2.0.0 Download Stable
1.0.3 Download Stable
1.0.2 Download Stable
1.0.1 Download Stable
Development Download Trunk

Plugin Info

  • Version: 2.1
  • Last Updated: June 17, 2026
  • Active Installs: 1,000+
  • WordPress Version: 6.0 or higher
  • Tested up to: 7.0
  • PHP Version: 7.4 or higher
  • Tags:    
    add-scripts body footer header insert-code

Ratings


4.1 out of 5 stars. (7 reviews)

See all reviews
Scroll to Top