sandywp / plugins / unique-headers

Unique Headers

4.9 out of 5 stars. 4.9 160 reviews

Add unique custom header images to individual pages, posts, categories, or tags.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v2.1.3 10,000+ installs WP 4.3+

your-sandbox.sandywp.com/wp-admin
Unique Headers running inside a SandyWP sandbox

What you get inside

3 screens
  • The new meta box as added to the posts/pages screen

  • The custom header image uploader for adding new header images

  • The new meta box for categories and tags.

About this plugin

This plugin has been actively maintained since 2012 and is used on over 20,000 websites worldwide.

Features

The Unique Headers Plugin adds a custom header image box to the post/page edit screen. You can use this to upload a unique header image for that post, or use another image from your WordPress media library. When you view that page on the front-end of your site, the default header image for your site will be replaced by the unique header you selected.

This functionality also works with categories and tags.

Requirements

You must use a theme which utilizes the built-in custom header functionality of WordPress. If your theme implement it’s own header functionality, then this plugin will not work with it.

Paid WordPress development

If you would like to pay for assistance, additional features to be added to the plugin or are just looking for general WordPress development services, please contact me via my contact form.

Development

This section is only relevant for developers building the plugin from source (e.g. cloning from GitHub). If you installed via WordPress.org, the plugin is ready to use — no build steps required.

The plugin uses Composer for PHP autoloading and dependencies, npm for JavaScript tooling, and TypeScript for admin JavaScript.

To set up a development environment:

  1. Install PHP dependencies: composer install
  2. Install JavaScript dependencies: npm install
  3. Compile TypeScript to JavaScript: npm run build

To run tests and analysis:

  • PHPCS (PSR-12 coding standards): composer phpcs
  • Auto-fix PHPCS violations: composer phpcbf
  • PHP-CS-Fixer (dry-run): composer cs
  • PHP-CS-Fixer (auto-fix): composer cs:fix
  • PHPStan static analysis: composer phpstan
  • PHPUnit unit tests: composer test
  • TypeScript type checking: npm run typecheck

TypeScript source files are in src/ts/. The compiled output is written to assets/admin.js and is what WordPress loads on the admin side.

Credits

Thanks to the following for help with the development of this plugin:
* redactuk – Assistance with debugging.
*
crabsallover – Assitance with debugging.
*
Todd – Assistance with implementing support for tags.
* Mariano J. Ponce – Spanish translation.
* Tobias Klotz – Deutsch (German) language translation.
* Nadia Tokerud – Proof-reading of Norsk Bokmål (Norwegian) translation.
* Bjørn Johansen – Proof-reading of Norwegian Bokmål translation.
* Karl Olofsson – Proof-reading of Swedish translation.
* Jenny Beaumont – French translation.

Questions

I set a category header image, but why are my individual posts not showing that header image?

Setting a category (or other taxonomy) header image, only causes that header image to show on the category page itself. It does not make the header image show on the single posts of that category.

To add this functionality, please install the Unique Headers single posts extension plugin.

Your plugin doesn’t work

Actually, it does work 😉 The problem is likely with your theme. Some themes have “custom headers”, but don’t use the built-in WordPress custom header system and will not work with the Unique Headers plugin because of this. It is not possible to predict how other custom header systems work, and so those can not be supported by this plugin. To test if this is the problem, simply switch to one of the default themes which come with WordPress and see if the plugin works with those, if it does, then your theme is at fault.

My theme doesn’t work with your plugin, how do I fix it?

This is a complex question and not something I can teach in a short FAQ. I recommend hiring a professional WordPress developer for assistance, or asking the developer of your theme to add support for the built-in WordPress custom header system.

Does it work with custom post-types?

Yes, as of version 1.5, support for publicly viewable custom post-types was added by default.

Does it work with taxonomies?

Yes, as of version 1.5 of the Unique Headers plugin, support for all publicly viewable custom taxonomies was added by default.

Where’s the plugin settings page?

There isn’t one.

Other plugins work out the width and height of the header and serve the correct sized header. Why doesn’t your plugin do that?

I prefer to allow you to set the width and height yourself by opening a correct sized image. This allows you to provide over-resolution images to cater for “retina screen” and zoomed in users. Plus, it allows you to control the compression and image quality yourself. Neither route is better in my opinion. If you require this functionality, please let me know though, as if most people prefer the other route, then I may change how the plugin works. I suspect most people won’t care either way though.

Does it work in older versions of WordPress?

Mostly, but I only actively support the latest version of WordPress. Support for older versions is purely by accident.

4.9

160 reviews

  • 5 ★ 155
  • 4 ★ 3
  • 3 ★ 1
  • 2 ★ 0
  • 1 ★ 1

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

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.