This plugin lets you specify a header image for each post individually from your default headers and custom headers.
It adds a meta box in the post edit screens with the header selection. 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.
I will be more than happy to update the plugin with new locales, as soon as I receive them!
Currently available in:
Thanks to Erik T. for the idea to this plugin!
- Download WP Display Header.
- Unzip the folder into the
- Activate the plugin through the ‘Plugins’ menu in WordPress
Frequently Asked Questions
- What do I need in the
header.phpfile to make the plugin work seamlessly?
- To make it work in your
header.phpfile all you need is a
header_image()call like so:
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
- 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
- Fixed a bug, where a selected header wouldn’t override the default selection on posts pages.
- Specific headers can now be reverted by selecting the default header.
- Adjusted meta box layout to WordPress core
- Transfered CSS in external file
- Updated FAQ section (thanks Brian!)
- Tested for WordPress 3.3.1
- Added support for WordPress 3.2 core header uploads
- 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.
- WordPress Plugin Repository update bug
- Tested for WordPress 3.1.2
- Now a custom folder name can be specified. See: Settings > Media
- Added Italian translation (Thanks to Pietro Rossi)
- Tested for WordPress 3.1.1
- Adopted WP Save Custom Header multisite capability
- Made HTML W3C valid
- Initial Release
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.
This is wonderful, but what if I only want a header on ONE page? Can you update this plugin to allow a user to select no header image? Thanks!
you could remove the default header image under Appearance > Header and set a specific header for that one page. Please let me know if that didn’t work out for you.
Thank you for your feedback!
This works. But only if you didn’t choose header image using this plug-in already. I didn’t find an option to disable it after that. Or revert to default theme header image state (which could be disabled).
But anyway, thank you for your work!
Using your plugin with Woo Theme’s Simplicity theme, I get an error message when trying to activate:
Plugin could not be activated because it triggered a fatal error.
Your current theme does not support Custom Headers
is there a way to fix it?
yes, you could use a Theme that supports the Custom Header functionality.
You recognize a Theme that does, by the ‘Header’ page in the ‘Appearance’ menu.
Let me know if you need further assistance.
Hi, I was wondering if there was a way using the current Twenty Eleven theme for wordpress to allow a header to show up on an archive page and have a specific header for various archive sections, such as individual author page headers (page just being the archive for that author) or tagged pages,
for example, http://www.yourwordpresssite.com/archives/author/johndoe or http://www.yourwordpresssite.com/archives/category/misc or
it seems that if I make a change to the archive header it changes to all archives regardless of whether they are author, category or tags or separated out such as author/johndoe or author/janedoe.
Any thoughts would be welcome,
I am currently working on an update which adds that functionality. Would you be interested to beta-test it and give me feedback about issues you run into?
Sure, be happy to help.
Being able to associate a specific banner with a page is a great feature. Thank you!
Clicking on the different banners, however, always leads to the home page.
Is there a way to associate a different URL with each banner?
If so, how do I accomplish that?
This would be something out of the scope for plugins, unfortunately. What you can do though, is to create a Child Theme and change the anchor manually in the Child Theme’s implementation of the feature.
I have the custom headers working on each page except the home pg. This theme does not have a home pg. How do I fix this?
By choosing a header in the Appearance > Header menu for you site?
Did that. The website settings under “Reading” is set for the home page to be the Latest Posts… could that effect it? Right now I deactivated the plugin so a header is on each page. When I activate it, the headers show on all the pages but the home. Thanks for your help. Love this plugin.
Very nice work. I d like to ask something. I cant see all pictures in header list that ı uploaded before. Can you please tell me what to do ?
thanks for your feedback!
Unfortunately I can’t. The Plugin pulls all headers that your Theme registered and that you uploaded in the Header admin screen.
Did you add the missing header images any other way?
Yes that’s way to see headers after spending 2 hours for discovering.Your plugin works like a charm. I dlike to ask you one more question if you have any information. Is there anyway to post in a specific category without shown in home page. As an ex. I post something ,it appears on my main page but I d like it to be seen only in category that I created.
Thanks again for nice plugin .
Hm, this would probably be suited best for the WordPress Forums. They can definitely help you with this.
Thank you for a wonderful plug-in! It fills a big void in the standard WP toolkit. I’m using WP Display Header on my website, and I have one question.
I’ve uploaded two custom header images (let’s call them A and B), and all pages use one or the other. My site has a static front page, with the blog being on another page. The image I set in WP Display Header as the blog page header, however, won’t stick. It’s using header A, even though I’ve set it to use header B.
I have solved this by changing the standard header preferences in the regular WP settings. If I set THAT to header B, it shows op on the blog page. Is it correct that the general WP headers settings will always override your plug-in’s settings for the blog page?
It’s all working for me now, but I was just curious about this.
As an aside, if you’re considering translating the plug-in into Dutch, I’d be happy to help. I cannot code or program, but if you give me the texts you need in a Word file, I’ll gladly translate them for you. 🙂
Yes, general Header settings will override specific one on the blog page. This is Core behavior though, that I didn’t change, I thought it made kind of sense.
I’m very excited that you would consider taking the time to contribute with a translation! There is this awesome plugin Codestyling Localization, which brings a translation interface into your WordPress Admin. There you can add languages (for all installed Themes and Plugins BTW) and translate away.
I’m sure many Dutch users would also be exited to have a localized version running on their installs!
I entered the <img src="” width=”” height=”” alt=”” /> line in my header.php file, but it still says that my theme doesn’t support custom headers. How come?
You still need to register theme support for this feature in
functions.php. See Twenty Eleven’s implementation for reference.
I found out the plugin couldn’t be activated because I didn’t have add_theme_support( ‘custom-header’ ); in functions.php (it was blank).
Pingback: My First Patch « Konstantin on WordPress
How do I get a new header image to show up as a Header image that the app will recognize? I added file to my media, but it does not show up as a selection for a specific page???
By either uploading it in Settings > Header, or choosing it in Settings > Header through the “Choose an image from your media library: Choose Image” button.
Hi, I’d like to translate the theme to spanish, What I have to do?, download Codestyling Localization plugin?
that’s awesome, thank you!
Yes, Codestyling Localization is a great tool to help you with the translation.
I’m looking forward to the results! 🙂
Thanks Konst! We love your plugin Header.
Full FLyght – Los Angeles.
Nice plugin, congratz Obenland, here are the translation to pt_PT, http://gaspar.com.pt/etc/wp-display-header-pt_PT.zip.
But now i’am digging in your code trying to undertsand I doesn’t work for custom types.
Probably I’ll have to change a little ur code.
eh eh, forget that “dont work”, it’s works well in custom. Cheers
One question, do u think it’s easy to:
if no header to this post and have post_parent get post parent header
I’am not expert in code, but i see that is somewhere in ur get_active_post_header()
Thank you so much for this plugin. I have my blog set to a static page. How can i get a header to show up on the blog index page(that is different from the default header)? I tried going to the blog page and setting a header through featured image (my blog supports custom headers) but it didn’t work. My theme is custom but based on toolbox. Thank you so much!
Hi there, thank you for your feedback!
The header shown on the blog index page will always be the default header. If you are comfortable with PHP, you can override that logic with a filter.
Do you have plans to update this plug in for WordPress 3.4.2.? If so, do you have an eta on delivery?
Is it broken in 3.4.2?
I’m currently looking at updating it for 3.5, so probably early December.
Love the plugin. I can get the headers I want on each specific page which is great – but I want a to randomly display only one of 3 headers on the home page which is static (the home page headers are different size) Any chance of getting this update or helping me add this to what I have currently? Thanks so much!
I’m sorry Helene, but I think that would be out of scope for the plugin.
Your plug works great. I’m currently using the twenty twelve theme and would like to not have an image on my static homepage to allow room for a slider. No image is set but I get an empty box that I cannot figure how to get rid of. Any help would be appreciated.
I’m sorry Rob, but due to the volume of support requests I have to ask you to post to the support forums where a volunteer might be able to help you with customizations.
My headers disappear in IE8, is there a remedy?
This appears to be an issue with the theme you are using.
The plugin has no effect on how the image is displayed, it only alters the source of the image.
Great plugin! Is it possible to display a header based on incoming search terms? For example, if the site visitor arrived from Google via a keyword search including “apple” or “orange”, can that info be used to display the appropriate header image?
I’m sure it is, just use the provided filter hooks and add your own callback function to make that determination! 😉
Thanks for the quick reply! Can you explain that in a little more detail?
My header appears too small. How can I fix that?
This sounds like a theme issue to me. WP Display Header does not alter any frontend styles, it only changes the image URL to work with.
Hi I have a problem when the page is viewed with the plug-in it adds 0.000000 in the middle of the image src call so giving a broken image. Can you help?
On further investigation it only seems to want to work with the default headers and not any that you upload
I’m sorry I could not reproduce that. It sounds to me like there is something wrong with the uploaded images or the uploader itself.
Thank you for the neat plugin that solved my problem. It is just a little messy, when adding many pages with own headers, to have to leave the page to upload the header, come back, select it. Could you add the possibility to upload a new header directly in the page editor ?
This sounds like something that would make sense to add. I’m fairly busy these days, so I’m not sure when I get around to it though.
I decided to close comments here and link to the plugin’s support forum instead. I hope this will give everyone a better chance to receive an answer to their question in a reasonable time as I’m not always able to react to comments right away.