Today I switched over to the new default template of Wordpress 3: Twenty Ten. I really like it. It’s clean, pretty flexible and very close to the Cutline template which I used before.
Twenty Ten allows you to choose either one of their default header images or you can upload one of your own. I don’t like having a static header image, I prefer seeing a different image with each new page load. Luckily, this can be achieved very easily by installing this plugin by HungryCoder: Twenty Ten Header Rotator. Once installed and activated it will rotate over all default header images plus the custom header image which you eventually uploaded by yourself.
Using Your Own Images
Though the default images are really nice, I would like to display my own images instead. Now, this needs a little bit more handiwork.
First, you need to create a couple of images with a width of 940 pixels and a height of 198 pixels. Now upload these images e.g. to themes/twentyten/images/myheaders.
Next, open functions.php and search for “register_default_headers”. You’ll find an array with all default images. Either add your own images additionally to the default ones or replace the default images. I decided for deleting the default images.
The code should look similar to this:
register_default_headers( array( '1' => array( 'url' => '%s/images/headers/1.JPG', 'thumbnail_url' => '%s/images/myheaders/1.JPG', 'description' => __( '1', 'twentyten' ) ), '2' => array( 'url' => '%s/images/headers/2.JPG', 'thumbnail_url' => '%s/images/myheaders/2.JPG', 'description' => __( '2', 'twentyten' ) ) // add more images here. ) );
Note, that I’m using the same URL for the regular image URL and the thumbnail URL. That messes up the Header admin page a little but I can live with that…



I'm a Software Developer, currently working at