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.
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!
Screenshots & previews.
- 01Download WP Display Header.
- 02Unzip the folder into the /wp-content/plugins/ directory
- 03Activate the plugin through the ‘Plugins’ menu in WordPress
Frequently asked questions.
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 )