WP Display Header

Description

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.

Translations

I will be more than happy to update the plugin with new locales, as soon as I receive them!
Currently available in:

  • English
  • Deutsch
  • Italiano

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

Screenshots

  • The meta box in the main column.
  • The meta box in the side column.

Installation

  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

FAQ

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.

Reviews

Simple and easy to use!

I love this! I have been looking for a simple plugin to control the header image on different pages. Easy to use and understand right from the start. I highly recommend this 🙂

-Christina

parfait!

exactement ce que je cherchais, pouvoir mettre des headers différents en fonction des pages, installé, tout de suite utilisé avec succès, simplissime
merci

works well if you need custom headers

The theme I was playing with didn’t have the ability to choose custom headers for each post or page. This plugin gave me that functionality without having to edit any templates.

It would be even better if it automatically added the “featured image” as a header instead of manually needing to upload and select the image for each page … but even so, this is a really useful plugin and one I’ve appreciated finding. Thank you.

Works OK but you need more than 1 header image

I know this might sound obvious, but it took me a while to figure this out… I was stuck at first because I only had 1 image set as a header. To fix this, go to Appearance > Header > and add more images. Then it works like it should.

It works but …

The plugin works, but it adds the functionality all over the backend in the most crazy places that I can’t control whether I want it to show up or not. As the backend of my Worpdress websites are designed for my clients, who usually know nothing about web design, I need to keep the backend as uncomplicated and easy to use as possible. As a result, I have stopped using this plugin and have found a much neater way to do it with custom fields.

Let me know if you ever come up with a way to control visibility of this plugin through the website backend.

Read all 20 reviews

Contributors & Developers

“WP Display Header” is open source software. The following people have contributed to this plugin.

Contributors

“WP Display Header” has been translated into Dutch. Thank you to the translators for their contributions.

Translate “WP Display Header” into your language.

Interested in development?

Browse the code or subscribe to the development log by RSS.

Changelog

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

1.0

  • Initial Release.