sandywp / plugins / wp-display-header
WP Display Header
Select a specific header or random header image for each content item or archive page.
Ready in seconds.
v9 7,000+ installs WP 3.2+ PHP 7.4+

What you get inside
2 screens-
The meta box in the main column.
-
The meta box in the side column.
About this plugin
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!
Questions
- What do I need in the `header.php` file to make the plugin work seamlessly?
To make it work in your
header.phpfile all you need is aheader_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.phpfor 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.
sandywp / also on the shelf
Try another plugin
4.9 · 10K+ installs
Add unique custom header images to individual pages, posts, categories, or tags.
4.4 · 5K+ installs
A great WordPress plugin which helps you to choose a unique image for each menu page.
3.5 · 600+ installs
Header Enhancement allows you to add an expressive custom header video on your website with features like mobile compatibility…
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.