WordPress.org

Ready to get started?Download WordPress

Plugin Directory

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 HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />

See TwentyEleven'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: 3.6.1
Last Updated: 2013-4-3
Downloads: 59,597

Ratings

4 stars
4.7 out of 5 stars

Support

1 of 5 support threads in the last two months have been 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