跳到内容

Header Footer Script Adder

v2.1.1

mahethekiller · 2017年2月2日 上架

Easily insert custom HTML, CSS, and JavaScript into your WordPress site's header, body, and footer without modifying theme files.

正在使用
1,000+
评分
4.1 / 5
累计下载
2.1 万
最近更新
2026年7月17日
7 条评价需要 WordPress 6.0+已测试到 7.0.9PHP 7.4+

截图

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.
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.
Help Section – Usage instructions and FAQs.
Help Section – Usage instructions and FAQs.

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

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums