I was asked to do some quick mods to client’s WordPress blog. He wanted to replace the banner image. He’s using WordPress 2.7 and has the default Kubrick theme.
This isn’t as easy as you would think as it’s generated by PHP so that the colours can be dynamically set.
Here’s what I did:
- Download wp-content/themes/default/images/kubrickheader.jpg
- Modify it, save and upload as wp-content/themes/default/images/kubrickheader_NEW.jpg
- Edit wp-content/themes/default/header.php. On line 42 you should see <div id=”headerimg”>
- Modify this so it reads:
<div id="headerimg" style="background: url(<?php bloginfo('stylesheet_directory'); ?>/images/kubrickheader_NEW.jpg) no-repeat -1px 0">
Upload header.php and it should now be using your new header. I used the “-1px 0” because the header was out of horizontal alignment by 1 pixel. I don’t know if that’s because of the header image he sent or if that’s the way WordPress’s dynamic banner image works. You might need to remove that part.
This probably isn’t the best way to do it but it’s a quick and easy solution.