Title: Header Footer Script Adder – Insert Code in Header, Body &amp; Footer
Author: mahethekiller
Published: <strong>2. februar, 2017</strong>
Last modified: 17. juni, 2026

---

Søk i utvidelser

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

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

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

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

[Last ned](https://downloads.wordpress.org/plugin/header-and-footer-script-adder.2.1.zip)

 * [Detaljer](https://nb.wordpress.org/plugins/header-and-footer-script-adder/#description)
 * [Omtaler](https://nb.wordpress.org/plugins/header-and-footer-script-adder/#reviews)
 *  [Installering](https://nb.wordpress.org/plugins/header-and-footer-script-adder/#installation)
 * [Utvikling](https://nb.wordpress.org/plugins/header-and-footer-script-adder/#developers)

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

## Beskrivelse

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

## Skjermbilder

[⌊Main Settings Page – Add scripts globally.⌉⌊Main Settings Page – Add scripts globally
.⌉[

**Main Settings Page** – Add scripts globally.

[⌊Code Editor – Syntax highlighting for easy editing.⌉⌊Code Editor – Syntax highlighting
for easy editing.⌉[

**Code Editor** – Syntax highlighting for easy editing.

[⌊Conditional Options – Control script placement (sitewide, homepage, archives, 
etc.).⌉⌊Conditional Options – Control script placement (sitewide, homepage, archives,
etc.).⌉[

**Conditional Options** – Control script placement (sitewide, homepage, archives,
etc.).

[⌊Per-Page Overrides – Unique scripts per post or page.⌉⌊Per-Page Overrides – Unique
scripts per post or page.⌉[

**Per-Page Overrides** – Unique scripts per post or page.

[⌊Help Section – Usage instructions and FAQs.⌉⌊Help Section – Usage instructions
and FAQs.⌉[

**Help Section** – Usage instructions and FAQs.

## Installasjon

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

## Ofte stilte spørsmål

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

## Vurderinger

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

### 󠀁[Nice plugin worked great for my usecase](https://wordpress.org/support/topic/nice-plugin-worked-great-for-my-usecase/)󠁿

 [vaibhavmohan30](https://profiles.wordpress.org/vaibhavmohan30/) 23. juni, 2026

Nice plugin worked great for my usecase

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

### 󠀁[A nice plugin to have.](https://wordpress.org/support/topic/a-nice-plugin-to-have/)󠁿

 [sahilpsharma](https://profiles.wordpress.org/sahilpsharma/) 23. juni, 2026

Made my task easier, was able to integrate GTM in few click.

![](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. oktober,
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. juni, 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. juni, 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. juni, 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.

 [ Les alle 7 vurderinger ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/)

## Bidragsytere og utviklere

«Header Footer Script Adder – Insert Code in Header, Body & Footer» er programvare
med åpen kildekode. Følgende personer har bidratt til denne utvidelsen:

Bidragsytere

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

[Oversett «Header Footer Script Adder – Insert Code in Header, Body & Footer» til ditt språk.](https://translate.wordpress.org/projects/wp-plugins/header-and-footer-script-adder)

### Interessert i utvikling?

[Bla gjennom koden](https://plugins.trac.wordpress.org/browser/header-and-footer-script-adder/),
sjekk ut [SVN-repositoriet](https://plugins.svn.wordpress.org/header-and-footer-script-adder/),
eller abonner på [utviklingsloggen](https://plugins.trac.wordpress.org/log/header-and-footer-script-adder/)
med [RSS](https://plugins.trac.wordpress.org/log/header-and-footer-script-adder/?limit=100&mode=stop_on_copy&format=rss).

## Endringslogg

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

## Meta

 *  Versjon **2.1**
 *  Sist oppdatert **2 uker siden**
 *  Aktive installasjoner **1 000+**
 *  WordPress-versjon ** 6.0 eller nyere **
 *  Testet opp til **7.0**
 *  PHP-versjon ** 7.4 eller nyere **
 *  Språk
 * [English (US)](https://wordpress.org/plugins/header-and-footer-script-adder/)
 * Stikkord
 * [add scripts](https://nb.wordpress.org/plugins/tags/add-scripts/)[body](https://nb.wordpress.org/plugins/tags/body/)
   [footer](https://nb.wordpress.org/plugins/tags/footer/)[header](https://nb.wordpress.org/plugins/tags/header/)
   [insert code](https://nb.wordpress.org/plugins/tags/insert-code/)
 *  [Avansert visning](https://nb.wordpress.org/plugins/header-and-footer-script-adder/advanced/)

## Vurderinger

 4.1 av 5 stjerner.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/?filter=5)
 *  [  2 4-star reviews     ](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)

[Se alle omtalene](https://wordpress.org/support/plugin/header-and-footer-script-adder/reviews/)

## Bidragsytere

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

## Brukerstøtte

Har du noe å si? Trenger du hjelp?

 [Vis brukerstøtteforumet](https://wordpress.org/support/plugin/header-and-footer-script-adder/)

## Donér

Vil du støtte videreutviklingen av denne utvidelsen?

 [ Doner til denne utvidelsen ](https://www.buymeacoffee.com/mahethekiller)