Twenty Eleven and the case of the missing Featured Header

It was late. The dark night was cold and windy. I had just come home and was lighting the fire to warm the chilled house as suddenly I heard three loud knocks at the door…

… Well, in fact it was not so cold and windy or even that late nor was there someone at the door. But there was a Skype call. It was one of my clients with the disturbing news that the featured custom header image on the front page of his website had suddenly been replaced by the default custom header image.

The theme is a Twenty Eleven child theme where (as with Twenty Eleven) the post or page featured image would serve as header image. The client had wanted to be able to control the header images per page so it was a logical choice to base the theme on Twenty Eleven. But now, suddenly this functionality seemed to have been lost.

Recognize this? Looking for an explanation? Then I won’t be bothering you about how long it took to find out what had happened and cut right to the chase: it turned out the client had switched on the Photon module that is in Jetpack.

Photon: Give your site a boost by loading images from the WordPress.com content delivery network.

Give your site a boost by loading images from the WordPress.com content delivery network.

Tempting, but Photon breaks the Featured Custom Header in Twenty Eleven.

Asking the kind people at Automattic, I had the good fortune to come in contact with Jeremy — who signs his mail with “Happiness Engineer” 😉 — and he informed me it is a known issue. But what’s more, he told me of a way to prevent my client, ignorant of this nasty incompatibility, switching on Photon again:

/* remove Jetpack's Photon for its incompatibility with the Twenty Eleven featured header image */
function black_out ( $modules ) {
    unset( $modules['photon'] );
    return $modules;
}
add_filter( 'jetpack_get_available_modules', 'black_out' );

This goes in the themes functions.php and I can rest assured to enjoy my cold, windy evenings undisturbed.

Read about this and more neat Jetpack mastery on CUSTOMIZE THE LIST OF MODULES AVAILABLE IN JETPACK.

One thought on “Twenty Eleven and the case of the missing Featured Header

Leave a Reply