Title: WP Display Header
Author: Konstantin Obenland
Published: <strong>2011 年 3 月 28 日</strong>
Last modified: 2026 年 5 月 28 日

---

搜尋外掛

![](https://ps.w.org/wp-display-header/assets/banner-772x250.jpg?rev=2820999)

![](https://s.w.org/plugins/geopattern-icon/wp-display-header_7f969c.svg)

# WP Display Header

 由 [Konstantin Obenland](https://profiles.wordpress.org/obenland/) 開發

[下載](https://downloads.wordpress.org/plugin/wp-display-header.8.zip)

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

 [技術支援](https://wordpress.org/support/plugin/wp-display-header/)

## 外掛說明

This plugin lets you specify a header image for each post, page, custom post type
or archive page individually, from your default headers and custom headers.

It adds a meta box in the post edit screens with the header selection and a settings
field in the edit profile and each taxonomy edit screen.
 If no specific header 
is specified for a post it will fall back to the default selection. There is no 
change of template files necessary as this plugin hooks in the existing WordPress
API to unfold its magic.

Thanks to Erik T. for the idea to this plugin!

## 螢幕擷圖

[⌊The meta box in the main column.⌉⌊The meta box in the main column.⌉[

The meta box in the main column.

[⌊The meta box in the side column.⌉⌊The meta box in the side column.⌉[

The meta box in the side column.

## 安裝方式

 1. Download WP Display Header.
 2. Unzip the folder into the `/wp-content/plugins/` directory
 3. Activate the plugin through the ‘Plugins’ menu in WordPress

## 常見問題集

### What do I need in the `header.php` file to make the plugin work seamlessly?

To make it work in your `header.php` file all you need is a `header_image()` call
like so:

    ```
    <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    ```

See TwentyTwelve’s `header.php` for reference.

### Plugin Filter Hooks

**wpdh_show_default_header** (_bool_)

> Whether to show the default header (true) or to look for a specifically selected
> header for the current request.

**wpdh_get_header_posts** (_array_)

> All attachments with the meta key `_header_image`. An array with the query vars.

**wpdh_get_headers** (_array_)

> The array with all registered headers.

**wpdh_get_active_post_header** (_string_)

> The url to the currently active header image.

## 使用者評論

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

### 󠀁[Simple and efficient](https://wordpress.org/support/topic/simple-and-efficient-221/)󠁿

 [pouicpouic](https://profiles.wordpress.org/pouicpouic/) 2019 年 5 月 2 日

This plugin does exactly what it promises, smooth and problem free.

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

### 󠀁[Does a fine job](https://wordpress.org/support/topic/does-a-fine-job-2/)󠁿

 [fuchsr](https://profiles.wordpress.org/fuchsr/) 2019 年 3 月 23 日

On my site I like to show a different hero graphic on each page, reflecting the 
specific contents of that page. The theme I’m using doesn’t allow me to choose different
header images. It uses the same on all pages. I tried a lot of plugins but this 
one was the only one that truly did the job. I found a couple of issues eg a header
image is available for selection but when I select it, the page shows the default
header instead. I was able to “fix” these issues but deleting the header images 
and re-uploading them. Would love to see an option to randomly pick headers based
on categories. Eg, I’d like one page to display a header picked from “Category A”
and another page show a header from “Category B”, with the headers randomly picked
from each respective category when pages are loaded.

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

### 󠀁[Perfectly integrated in WP, works great](https://wordpress.org/support/topic/perfectly-integrated-in-wp-works-great/)󠁿

 [kingbolo](https://profiles.wordpress.org/kingbolo/) 2019 年 1 月 22 日

One of the best plugins for this job. Integrates perfectly in WordPress and it looks
that it belongs there. (and probably should).

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

### 󠀁[Only uploading could be improved](https://wordpress.org/support/topic/only-uploading-could-be-improved/)󠁿

 [Sudrien](https://profiles.wordpress.org/sudrien/) 2019 年 1 月 19 日

WP Display Header works with the standard header_image(); system. As of 5.0.3, UPLOADING
header images seems a bit inconsistent, as it does not seem you can do that while
editing a page, but otherwise works well.

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

### 󠀁[Nice Plugin – Just works](https://wordpress.org/support/topic/nice-plugin-just-works/)󠁿

 [Dennis Booker](https://profiles.wordpress.org/dabooker/) 2018 年 4 月 23 日

I’ve looked through lots of postings and articles to find a way to have custom headers
and this plugin does just that. I’m using WP 4.9.5 and theme Twenty Seventeen and
no problems. Thanks.

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

### 󠀁[Works great on WordPress.com](https://wordpress.org/support/topic/does-not-work-at-all-on-wordpress-com/)󠁿

 [r6123603680](https://profiles.wordpress.org/r6123603680/) 2017 年 10 月 27 日

Initially, I thought this was yet another plugin featured in the plugin directory
for WordPress.com doesn’t actually work there. As it turns out, it works perfectly
but you have to edit your pages through the legacy wp-admin console, not the main
editor. It works great – you just select “none” for the header image and voila!

 [ 閱讀全部 28 則使用者評論 ](https://wordpress.org/support/plugin/wp-display-header/reviews/)

## 參與者及開發者

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

參與者

 *   [ Konstantin Obenland ](https://profiles.wordpress.org/obenland/)

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

[將〈WP Display Header〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/wp-display-header)

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

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

## 變更記錄

### 7

 * Fixes a bug where posts pages would not load their assigned header image. See
   https://github.com/obenland/wp-display-header/issues/3
 * Updated utility class.
 * Tested for WordPress 6.1.

### 6

 * Fixed a bug where srcset information for header images overrode custom header
   selections.

### 5

 * Maintenance release.
 * Updated code to adhere to WordPress Coding Standards.
 * Tested for WordPress 5.0.

### 4

 * Fixed a bug where styles were not enqueued correctly in wp-admin.
 * Now correctly displays the selection for header images on term edit pages again.
 * Tested for WordPress 4.6.0.

### 3

 * Maintenance release.
 * Some minor code cleanups.
 * Tested for WordPress 4.4.0.

### 2.2.0

 * Maintenance release.
 * Some minor code cleanups.
 * Tested for WordPress 4.0.

### 2.1.0

 * Added an option to not display a header at all.
 * Updated utility class.
 * Tested for WordPress 3.6.

### 2.0.1

 * Fixed a bug, where the fallback to the default header did not work. Props carloscorrela.

### 2.0.0

 * **IMPORTANT**: Version 2.0.0 breaks compatibility with WordPress versions **prior**
   to 3.2!
 * Added the header selection field to Taxonomy and Author Edit screens.
 * Fixed a minor bug for themes that have no header images registered.

### 1.5.3

 * Improved user experience when current theme does not support custom headers, 
   on activation of the plugin.
 * Deprecated settings functions for WP Save Custom Header in preparation for overhaul
   in v2.0.0.
 * Updated utility class.

### 1.5.2

 * Fixed a bug, where a selected header wouldn’t override the default selection 
   on posts pages.

### 1.5.1

 * Specific headers can now be reverted by selecting the default header.

### 1.5

 * Adjusted meta box layout to WordPress core.
 * Transfered CSS in external file.
 * Updated FAQ section. Props Brian.
 * Tested for WordPress 3.3.1.

### 1.4

 * Added support for WordPress 3.2 core header uploads.

### 1.3

 * Tested for WordPress 3.2-beta
 * Fixed a minor bug where a PHP warning was issued in the edit-post-screen, when
   there are no header images registered.

### 1.2.1

 * WordPress Plugin Repository update bug.

### 1.2

 * Tested for WordPress 3.1.2.
 * Now a custom folder name can be specified. See: Settings > Media.
 * Added Italian translation. Props Pietro Rossi.

### 1.1

 * Tested for WordPress 3.1.1
 * Adopted [WP Save Custom Header](https://wordpress.org/extend/plugins/wp-save-custom-header/)
   multisite capability.
 * Made HTML W3C valid.

### 1.0

 * Initial Release.

## 中繼資料

 *  版本 **8**
 *  最後更新 **1 個月前**
 *  啟用安裝數 **7,000+**
 *  WordPress 版本需求 ** 3.2 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.0**
 *  語言
 * [Dutch](https://nl.wordpress.org/plugins/wp-display-header/)、[English (US)](https://wordpress.org/plugins/wp-display-header/)、
   [German](https://de.wordpress.org/plugins/wp-display-header/)、及 [Ukrainian](https://uk.wordpress.org/plugins/wp-display-header/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/wp-display-header)
 * 標籤:
 * [custom header](https://tw.wordpress.org/plugins/tags/custom-header/)[Dynamic](https://tw.wordpress.org/plugins/tags/dynamic/)
   [header-image](https://tw.wordpress.org/plugins/tags/header-image/)[posts](https://tw.wordpress.org/plugins/tags/posts/)
 *  [進階檢視](https://tw.wordpress.org/plugins/wp-display-header/advanced/)

## 評分

 4.5 星，滿分為 5 星

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

[Your review](https://wordpress.org/support/plugin/wp-display-header/reviews/#new-post)

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

## 參與者

 *   [ Konstantin Obenland ](https://profiles.wordpress.org/obenland/)

## 技術支援

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

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

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MWUA92KA2TL6Q)