Title: Header Footer Script Adder – Insert Code in Header, Body &amp; Footer
Author: mahethekiller
Published: <strong>2 ខែ​កុម្ភៈ, 2017</strong>
Last modified: 3 ខែ​វិច្ឆិកា, 2025

---

ស្វែងរក កម្មវិធីបន្ថែម

![](https://ps.w.org/header-and-footer-script-adder/assets/banner-772x250.png?rev
=3321624)

![](https://ps.w.org/header-and-footer-script-adder/assets/icon-128x128.png?rev=
3321624)

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

 By [mahethekiller](https://profiles.wordpress.org/mahethekiller/)

[Download](https://downloads.wordpress.org/plugin/header-and-footer-script-adder.2.0.6.zip)

 * [Details](https://km.wordpress.org/plugins/header-and-footer-script-adder/#description)
 * [Reviews](https://km.wordpress.org/plugins/header-and-footer-script-adder/#reviews)
 *  [Installation](https://km.wordpress.org/plugins/header-and-footer-script-adder/#installation)
 * [Development](https://km.wordpress.org/plugins/header-and-footer-script-adder/#developers)

 [Support](https://wordpress.org/support/plugin/header-and-footer-script-adder/)

## 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 (`<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](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).

## Screenshots

 * [[
 * **Main Settings Page** – Add scripts globally.
 * [[
 * **Code Editor** – Syntax highlighting for easy editing.

## Installation

 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**.

## FAQ

### 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.

## Reviews

![](https://secure.gravatar.com/avatar/d6b684c8707eef3aec1154e87cc7b206b1d4c0a810ad15844e67f36b23a37623?
s=60&d=retro&r=g)

### 󠀁[Per page additions & great support](https://wordpress.org/support/topic/per-page-additions-great-support/)󠁿

 [someguycalledralph](https://profiles.wordpress.org/someguycalledralph/) 24 ខែ​
តុលា, 2025

I love this plugin. It allows you to add to <head> on per page basis, which not 
a lot of these script inserter type plugins do. I use this to preload LCP images
on a per page basis, which helps improve your website’s core web vitals (better 
visitor experience, and improved rankings!). I had one issue, I messaged support,
and got a reply AND A FIX in a very short space of time. I was impressed!If you 
need to do per page <head>, <body> or footer scripts on a per page basis, this plugin
is a winner!

![](https://secure.gravatar.com/avatar/f0c1ae1f239fba7c73e0cd6a8f4a9576d9dc6279cb4ab594ddcf4ce7276742dc?
s=60&d=retro&r=g)

### 󠀁[Simple and Reliable](https://wordpress.org/support/topic/simple-and-reliable-66/)󠁿

 [roimantra](https://profiles.wordpress.org/roimantra/) 19 ខែ​មិថុនា, 2025

I was looking for an easy way to add some custom JavaScript and tracking pixels 
to my WordPress site without digging into theme files—and this plugin did the job
perfectly. The Header and Footer Script Adder is incredibly straightforward. Just
copy your code, paste it into the header or footer box, and you’re good to go. It
even lets you add scripts to individual pages or posts, which is super useful for
things like conversion tracking. What I really like: Super lightweight – doesn’t
slow down my site at all. No complicated setup – very beginner friendly. Works across
themes – I switched themes recently, and all my scripts still worked without any
issues. Honestly, it’s one of those plugins that does one thing and does it really
well. No clutter, no unnecessary settings—just clean and effective. If you need 
to insert scripts without breaking your site or getting lost in code, give this 
plugin a try. It’s now one of my go-to tools for every WordPress project!

![](https://secure.gravatar.com/avatar/00025ab4577f3933fd6a01823f20b2a7d18adb73e79fbccdb2a48453825e3cf5?
s=60&d=retro&r=g)

### 󠀁[Plugin Review: Header and Footer Script Adder](https://wordpress.org/support/topic/plugin-review-header-and-footer-script-adder/)󠁿

 [abhishekkk](https://profiles.wordpress.org/abhishekkk/) 19 ខែ​មិថុនា, 2025

I’ve been using the Header and Footer Script Adder plugin for a few weeks now, and
it’s been a lifesaver. I needed a simple way to add custom scripts like Google Analytics,
chat widgets, and a few tracking codes to my site—without touching theme files or
editing functions.php. This plugin does exactly what it promises. You can easily
insert code into the header or footer of your entire site or even just on specific
posts or pages. The interface is super simple and straightforward. No bloated settings
or confusing options. Just paste your code and save—done! What I love most is that
it works regardless of the theme I’m using, so I don’t have to worry about losing
my scripts if I change themes in the future. Would recommend this plugin to: Beginners
who need a quick solution for adding scripts. Developers who want a clean, no-fuss
way to insert site-wide or page-level code. Anyone who wants to keep things organized
and avoid messing with core files. There are no unnecessary features, and that’s
honestly a good thing. It keeps everything lightweight and easy to manage. Great
job to the developer! This one’s staying on my must-have list.

![](https://secure.gravatar.com/avatar/c39613a7f0113cd70232aaf783f6ae04f27ccf68aa4df45a4a09bdd3c33c8794?
s=60&d=retro&r=g)

### 󠀁[Plugin Works As described](https://wordpress.org/support/topic/plugin-works-as-described-3/)󠁿

 [m254032](https://profiles.wordpress.org/m254032/) 19 ខែ​មិថុនា, 2025

This plugin is very simple and easy to use, i have used it in many projects i does
what it says. also new update is great.

![](https://secure.gravatar.com/avatar/810d42d26127d30cbc4f9b4e496c1c3637e7c4cc3fa9f0201ea043243dd9f583?
s=60&d=retro&r=g)

### 󠀁[Invasive & spammy donation requests on every page](https://wordpress.org/support/topic/invasive-spammy-donation-requests-on-every-page/)󠁿

 [kermit666](https://profiles.wordpress.org/kermit666/) 13 ខែ​មីនា, 2017 1 reply

This is the reason I’m getting more and more frustrated with WordPress. Can’t add
a simple <script> element to my site, without having to paddle through 5 lousy plugins…
This plugin does fulfil its simple role (that I wouldn’t even need if WordPress 
had built in some elementary HTML customisation), but somehow decided that it’s 
appropriate to spam me and other admins with requests for donations on every dashboard
page that we open – and I couldn’t disable this without deleting the plugin. Look,
I understand you want to make some cash, but then please clearly mark this as freemium
or make it a paid thing. This thing you’re doing now is just plain rude.

 [ Read all 4 reviews ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/)

## Contributors & Developers

“Header Footer Script Adder – Insert Code in Header, Body & Footer” is open source
software. The following people have contributed to this plugin.

Contributors

 *   [ mahethekiller ](https://profiles.wordpress.org/mahethekiller/)

[Translate “Header Footer Script Adder – Insert Code in Header, Body & Footer” into your language.](https://translate.wordpress.org/projects/wp-plugins/header-and-footer-script-adder)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/header-and-footer-script-adder/),
check out the [SVN repository](https://plugins.svn.wordpress.org/header-and-footer-script-adder/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/header-and-footer-script-adder/)
by [RSS](https://plugins.trac.wordpress.org/log/header-and-footer-script-adder/?limit=100&mode=stop_on_copy&format=rss).

## 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.

## មេតា

 *  Version **2.0.6**
 *  Last updated **6 ខែ មុន**
 *  Active installations **1,000+**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **6.8.5**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/header-and-footer-script-adder/)
 * Tags
 * [add scripts](https://km.wordpress.org/plugins/tags/add-scripts/)[body](https://km.wordpress.org/plugins/tags/body/)
   [footer](https://km.wordpress.org/plugins/tags/footer/)[header](https://km.wordpress.org/plugins/tags/header/)
   [insert code](https://km.wordpress.org/plugins/tags/insert-code/)
 *  [Advanced View](https://km.wordpress.org/plugins/header-and-footer-script-adder/advanced/)

## Ratings

 4 out of 5 stars.

 *  [  3 5-star reviews     ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/)

## Contributors

 *   [ mahethekiller ](https://profiles.wordpress.org/mahethekiller/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/header-and-footer-script-adder/)

## បរិច្ចាក

Would you like to support the advancement of this plugin?

 [ បរិច្ចាក ទៅឲ្យកម្មវិធីបន្ថែមនេះ ](https://www.buymeacoffee.com/mahethekiller)