[WordPress] 外掛分享: Header Footer Script Adder – Insert Code in Header, Body & Footer

首頁外掛目錄 › Header Footer Script Adder – Insert Code in Header, Body & Footer
WordPress 外掛 Header Footer Script Adder – Insert Code in Header, Body & Footer 的封面圖片
1,000+
安裝啟用
★★★★
4/5 分(5 則評價)
137 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v2.0.6 上架:2017-02-01

內容簡介

許多 WordPress 主題沒有任何選項在您的網站中插入標頭和頁尾標籤 <head> 或 <footer>。這可以幫助您避免主題鎖定。但有時候也會對很多人造成困擾,例如在哪裡插入 Google Analytics 代碼(或任何其他網頁分析代碼)。這個外掛是個小巧且全能的解決方案。透過這個「Header and Footer Script」外掛,您可以輕鬆地將 HTML、JS 和 CSS 代碼插入到 <head> 和 <footer> 中。
感謝協作者 Narendra Kumar Singh 先生(Roi Mantra 資深軟體開發人員)的協助,我開發了這個外掛。謝謝您的支持!

外掛的好處:

您可以在 <head> 中插入 Google Analytics 或其他網頁分析代碼、meta 訊息、CSS 和 JS 代碼。
您可以在網站頁尾中插入 HTML 和/或 JavaScript 代碼。這是 Clicky Web Analytics、Twitter、Facebook 或任何其他社交媒體腳本的好地方。
除了預設代碼之外,您還可以輕鬆地將代碼插入到單個文章和頁面的標頭中。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.6) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Header Footer Script Adder – Insert Code in Header, Body & Footer」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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

延伸相關外掛

文章
Filter
Mastodon