WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

WP Display Header

Select a specific header or random header image for each content item or archive page.

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.

Requires: 3.2 or higher
Compatible up to: 4.6.0
Last Updated: 6 months ago
Active Installs: 10,000+

Ratings

4.6 out of 5 stars

Support

0 of 6 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2 100,1,1
100,1,1 100,1,1
0,1,0
100,5,5
100,2,2 100,1,1 100,2,2 100,2,2
100,1,1 100,1,1 100,2,2
100,1,1
100,2,2
67,3,2
100,1,1
100,1,1
50,2,1
100,1,1
0,2,0
100,1,1
100,1,1
100,1,1
100,1,1
0,1,0
100,1,1