Title: Add Custom Header Images
Author: Andy Fragen
Published: <strong>2014 年 5 月 18 日</strong>
Last modified: 2026 年 8 月 13 日

---

搜尋外掛

![](https://ps.w.org/add-custom-header-images/assets/banner-772x250.png?rev=2560195)

![](https://s.w.org/plugins/geopattern-icon/add-custom-header-images_f5f5f5.svg)

# Add Custom Header Images

 由 [Andy Fragen](https://profiles.wordpress.org/afragen/) 開發

[下載](https://downloads.wordpress.org/plugin/add-custom-header-images.2.3.6.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/add-custom-header-images/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/add-custom-header-images/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/add-custom-header-images/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/add-custom-header-images/#developers)

 [技術支援](https://wordpress.org/support/plugin/add-custom-header-images/)

## 外掛說明

這個外掛僅需新增一個標題為**「頁首圖片」**(不含左右引號) 的頁面，便能移除佈景主題
預設的頁首圖片，並在佈景主題中選取隨機自訂頁首圖片。

這個外掛能移除佈景主題預設頁首，並新增自訂頁首。外掛開發靈感來自受到 [wpti.ps](https://wpti.ps/?p=107)
啟發的 [Julio Biason](http://juliobiason.net/2011/10/25/twentyeleven-with-easy-rotating-header-images/)。

請先建立一個標題命名為**「頁首圖片」**(不含左右引號) 的頁面，然後上傳頁首圖片 (媒體
檔案) 至這個頁面。請注意，這個頁面可以是私密頁面。外掛會剖析顯示於這個頁面的全部
圖片，這些圖片穢語這個頁面產生關聯，並可透過 [圖片] 區塊新增圖片。

自訂頁首圖片上傳完畢後，請前往 [外觀][頁首] 或 [外觀][自訂][頁首圖片]，並選取 [隨機
顯示建議的頁首圖片]。

如果網站**沒有**標題命名為**「頁首圖片」**的頁面，外掛便會顯示錯誤通知訊息。

## 安裝方式

 1. 建立一個新頁面 (可以是私密頁面)，但標題必須命名為**「頁首圖片」**(不含左右引號)，
    並將任何要用於自訂頁首圖片的圖片新增至這個頁面。請適當裁剪頁首圖片至符合佈景主題
    所需尺寸。
 2. 將解壓縮所得的 `add-custom-header-images` 資料夾及其全部檔案上傳至 `/wp-content/
    plugins/` 目錄。
 3. 在 WordPress 管理後台的 [外掛] 選單中啟用外掛。
 4. 前往 [外觀][頁首] 或 [外觀][自訂][頁首圖片]，並在預設圖片區段選取 [隨機顯示建議
    的頁首圖片]。

## 使用者評論

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

### 󠀁[After spending 10 hours trying to modify my header, this plugin finally did it!](https://wordpress.org/support/topic/after-spending-10-hours-trying-to-modify-my-header-this-plugin-finally-did-it/)󠁿

 [Mehlman Medical](https://profiles.wordpress.org/theforwardmale/) 2020 年 2 月 
8 日

I have zero code experience. I spent probably 6-10 hours over several days trying
to figure out how to reduce the height of my header (i.e., make it slimmer, but 
keep width the same) using CSS code. I had absolutely zero interest in messing with
the theme editor because I've had my fair share of scares where I've almost crashed
my site. Despite all of the supposed solutions out there, nothing was working. I
even tried the Elementor plugins, and those didn't work either. Then this one finally
worked. Best part, once again, is that you can *change the height* of your header
to make it slimmer if you want. So now my pages don't have the large rectangular
header image anymore. Only downside is I can't customize based on the page. I originally
wanted to keep the home page the same but make all other pages' header slimmer, 
but this plugin will change the header on all pages. But I have to give it 5 stars
because, as I said, it's the only thing that's worked for me. Nothing else has been
able to make my header image slimmer. Thanks again,

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

### 󠀁[Great, except default 2011 header images show up.](https://wordpress.org/support/topic/great-except-default-2011-header-images-show-up/)󠁿

 [Jake Sterling](https://profiles.wordpress.org/jake-sterling/) 2016 年 9 月 3 日
4 則留言

I am using Add Custom Header Images with the WordPress Twenty Eleven theme. It works
great except that there seems to be a bug. The Twenty Eleven theme comes with a 
number of default header images that show up along with the images I had uploaded
to the "The Headers" page for the plugin to use. I did a hack to fix this using 
a tip from Voodoo Press: http://voodoopress.com/adding-and-removing-default-headers-
in-twentyeleven/ // REMOVE SOME DEFAULT HEADERS function voodoo_header_out() { unregister_default_headers(
array( 'wheel', 'shore', 'trolley') ); } add_action( 'after_setup_theme', 'voodoo_header_out',
11 ); If you do this, be aware that the array of default images in the example is
incomplete. You will have to add the rest of them.

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

### 󠀁[Very easy and simple plugin](https://wordpress.org/support/topic/very-easy-and-simple-plugin/)󠁿

 [ilanfl](https://profiles.wordpress.org/ilanfl/) 2016 年 9 月 3 日 1 則留言

Does what I needed

 [ 閱讀全部 4 則使用者評論 ](https://wordpress.org/support/plugin/add-custom-header-images/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Add Custom Header Images〉的開發相關工作。

參與者

 *   [ Andy Fragen ](https://profiles.wordpress.org/afragen/)

〈Add Custom Header Images〉外掛目前已有 1 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/add-custom-header-images/contributors)
為這個外掛做出的貢獻。

[將〈Add Custom Header Images〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/add-custom-header-images)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/add-custom-header-images/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/add-custom-header-images/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/add-custom-header-images/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/add-custom-header-images/)。

## 變更記錄

#### 2.3.6 / 2026-08-13

 * update GitHub Actions
 * update tested to

#### 2.3.5 / 2025-04-03

 * add GA to generate POT
 * change startup action hook to `after_setup_theme` for translations

#### 2.3.4 / 2024-11-01

 * remove `load_plugin_textdomain()`

#### 2.3.3 / 2023-07-21

 * use ‘all’ over ‘any’ in query, perhaps better
 * call `wp_get_attachment_image()` to populate specific attributes

#### 2.3.2 / 2023-02-08

 * improve WP_Query for single call

#### 2.3.1 / 2023-02-08

 * fix to use public or private pages

#### 2.3.0 / 2023-02-05

 * PHP 8.1 compatibility changes
 * update for deprecated `get_page_by_title()`
 * start from `plugins_loaded`

#### 2.2.0 / 2023-01-13

 * update GitHub Actions
 * update to add alt text to header image

#### 2.1.0 / 2021-07-07

 * add @10up GitHub Actions for SVN

#### 2.0.3 / 2020-08-01

 * add check for PHP warning

#### 2.0.2 / 2020-03-28

 * initialize some variables

#### 2.0.1 / 2020-03-03

 * add header image support to theme if none exists
 * parse images from page blocks
 * refactor class methods

#### 1.9.0

 * always load `after_theme_setup` filter

#### 1.8.1

 * correctly initialize `load_plugin_textdomain()`

#### 1.8.0

 * simplify admin notice
 * WPCS compliant
 * fixed to use `wp_get_attachment_url()`, thanks @poulh

#### 1.7.0

 * use WP_Query instead of `get_children()`
 * only load `after_theme_setup` hook on front end

#### 1.6.1

 * update _Tested to_
 * simplify conditional

#### 1.6.0

 * don’t run from constructor
 * requires PHP 5.3, sorta

#### 1.5.2

 * use class variables to hold title and page data to reduce number of calls to 
   database

#### 1.5.1

 * set `after_theme_setup` hook to use later priority to ensure $_wp_default_headers
   is set, fixes removal of default images

#### 1.5.0

 * removed specific srcset code as it was unnecessary and caused failures. `srcset`
   needs to be set correctly in `header.php`

#### 1.4.2

 * fixed malformed closing `strong` tag in error message

#### 1.4.1

 * escape translations of page name

#### 1.4.0

 * added srcset for responsive image sizes
 * tested and updated for WP 4.4.0

#### 1.3.3

 * tested to 4.3

#### 1.3.2

 * load textdomain early so translations work.

#### 1.3.1

 * fix readme.txt as plugin name generic
 * simplify warning, remove nested if statements
 * update .pot

#### 1.3.0

 * better i18n strings, updated POT

#### 1.2.0

 * move `remove_default_header_images` to run only if **The Headers** page is present.
   Should fix a PHP Notice too.

#### 1.1.0

 * remove `deactivate_plugins` to and just display an error notice for better compatibility.

#### 1.0.4

 * added some error checking

#### 1.0.3

 * more graceful exit and return

#### 1.0.2

 * exit after deactivating plugin when not able to be activated

#### 1.0.1

 * Add .pot files
 * Fix short description by removing Markdown

#### 1.0.0

 * Initial commit to WordPress repository

## 中繼資料

 *  版本 **2.3.6**
 *  最後更新 **3 個月前**
 *  啟用安裝數 **400+**
 *  WordPress 版本需求 ** 5.2 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.1.4**
 *  PHP 版本需求 ** 5.6 或更新版本 **
 *  語言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/add-custom-header-images/)
   及 [English (US)](https://wordpress.org/plugins/add-custom-header-images/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/add-custom-header-images)
 * 標籤:
 * [headers](https://tw.wordpress.org/plugins/tags/headers/)[images](https://tw.wordpress.org/plugins/tags/images/)
 *  [進階檢視](https://tw.wordpress.org/plugins/add-custom-header-images/advanced/)

## 評分

 4.7 星，滿分為 5 星

 *  [  2 個 5 星使用者評論     ](https://wordpress.org/support/plugin/add-custom-header-images/reviews/?filter=5)
 *  [  1 個 4 星使用者評論     ](https://wordpress.org/support/plugin/add-custom-header-images/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/add-custom-header-images/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/add-custom-header-images/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/add-custom-header-images/reviews/?filter=1)

[撰寫評分](https://wordpress.org/support/plugin/add-custom-header-images/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/add-custom-header-images/reviews/)

## 參與者

 *   [ Andy Fragen ](https://profiles.wordpress.org/afragen/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/add-custom-header-images/)