Insert Headers and Footers

外掛說明

Easily Insert Header and Footer Code

Insert Headers and Footers is a simple plugin that lets you insert code like Google Analytics, custom CSS, Facebook Pixel, and more to your WordPress site header and footer. No need to edit your theme files!

The simple interface of the Insert Headers and Footers plugin gives you one place where you can insert scripts, rather than dealing with dozens of different plugins.

Features of Insert Headers and Footers

  • Quick to set up
  • Simple to insert scripts
  • Insert header code and/or footer code
  • Add Google Analytics code to any theme
  • Add custom CSS across themes
  • Insert Facebook pixel code
  • Insert any code or script, including HTML and Javascript

Credits

This plugin is created by Syed Balkhi and the WPBeginner team.

What’s Next

If you find this plugin useful to insert header and footer scripts, please leave a good rating and consider checking out our other projects:

To learn more about WordPress, you can also visit WPBeginner for tutorials on topics like:

…and many more WordPress tutorials.

Notes

Insert Headers and Footers is the easiest way to insert code in your WordPress headers and footers.

Our goal is to make using WordPress easy, both with our WordPress plugins and resources like WPBeginner, the largest WordPress resource site for beginners.

I feel that we have done that here. I hope find Insert Headers and Footers useful to insert scripts on your site.

Thank you
Syed Balkhi

螢幕擷圖

  • Settings Screen

安裝方式

  1. Install Insert Headers and Footers by uploading the insert-headers-and-footers directory to the /wp-content/plugins/ directory. (See instructions on how to install a WordPress plugin.)
  2. Activate Insert Headers and Footers through the Plugins menu in WordPress.
  3. Insert code in your header or footer by going to the Settings > Insert Headers and Footers menu.

常見問題集

Can I use Insert Headers and Footers to install Google Analytics?

Yes, you can insert your Google Analytics code in the Scripts in Header field.

Can I use Insert Headers and Footers for Google AdSense?

Yes, to verify your account or to tag your page for Auto ads, paste the code AdSense gives you, into the Scripts in Header field.

How to disable Insert Headers and Footers on a specific page?

You can use one of the three available boolean filters: disable_ihaf, disable_ihaf_footer, disable_ihaf_header, disable_ihaf_body and return true value in order to disable printing either on the entire page or specifically in the header or footer of a given page.

使用者評論

2020 年 12 月 2 日
So I met some stuff that wants me to put stuff in the header and footer of wordpress, but we all know that straight up editing the wordpress files is not only precise stuff, but also you need to do it again every update or know how to make a child theme when all you want is some lines in the header? This plugin didn't disappoint me. It has a box for the head and a box for the footer and in years never seen a hiccup using this plugin. So, I'm very happy!
2020 年 10 月 27 日
So simple and so easy to use! Loved that I was able to claim my website for my Pinterest profile! Thank you guys! You rock!
2020 年 10 月 22 日
It's working with a script changing header-pictures on "click arrow". I have used Javascript, but please inform us which codings can be used. (danish) Det virker fint med et javascript hvor der skiftes mellem headerbilleder ved klik på en pil. Men det ville være generelt godt, hvis pluginproducenter ikke blot skriver "coding" men fortæller hvilke kodesprog, der kan bruges.
閱讀全部 92 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Insert Headers and Footers〉的開發相關工作。

參與者

Insert Headers and Footers 外掛目前已有 19 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將 Insert Headers and Footers 外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.5.0

  • New: Code editors now use CodeMirror for syntax highlighting.

1.4.6

  • Tested compatibility with WordPress 5.4.2

1.4.5

  • Tested compatibility with WordPress 5.3.2
  • Add support for printing scripts right after the opening body tag using the wp_body_open action

1.4.4

  • Tested compatibility with WordPress 5.2
  • Updated text-domain standards and in plugin header

1.4.3

  • Update FAQs
  • Introduce three new filters: disable_ihaf, disable_ihaf_footer, disable_ihaf_header

1.4.2

  • Code cleanups

1.4.1

  • Fixes for users running PHP version less than 5.5

1.4

  • Tested with WordPress 4.7.2
  • cleaned up code

1.3.3

  • Tested with WordPress 4.3
  • Fix: plugin_dir_path() and plugin_dir_url() used for Multisite / symlink support

1.3.2

  • Fix: Dashboard widget logo URL when RSS feed cannot be loaded
  • Fix: WordPress 4.0 support
  • Added: POT language file

1.3.1

  • Improved settings UI for WordPress 3.8+
  • Bumped minimum version requirement

1.3

  • fixed readme file

1.2

  • cleaned up code

1.1

  • fixed unnecessary CSS loading

1.0

  • Initial version