Cimy Header Image Rotator and a Twenty Ten Child Theme

The previous post about rotating the header images in the Twenty Ten theme has been quite popular

but it was bad advice because as soon as you update your WordPress and/or theme files your changes are overwritten and lost. The solution is to move the changes into a child theme where they will overwrite the files in the original theme even when updating.

To make a child theme we simply create a folder in the WordPress themes folder (in the wp-content folder) and give it a name: mychildtheme (or whatever you want to call it).

We then save a plain text file called style.css into the mychildtheme folder. The style.css file reads:

/*
Theme Name: mychildtheme
Template: twentyten
*/

@import url(“../twentyten/style.css”);

#cimy_div_id {
clear: both;
border-top: 4px solid #000;
border-bottom: 1px solid #000;
width: 940px;
height: 198px;
}

Where the Theme name and Template are required to indicate the parent and the child. The import URL grabs the original style.css file to be altered by our style.css file. We then include the #cimy_div_id section that we had originally used in the header.php file.

Create a new plain text file and copy the contents of the header.php file into it. Replace the

<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />

code with the


<div id="cimy_div_id">

<noscript>
<img id="cimy_img_id" src="http://yourDomain.com/somePicture.jpg" alt="" />
</noscript>

</div>

as before (we no longer need the styling here as it is in the style.css file), and then save this as header.php into the mychildtheme folder.

We can now preview and activate our mychildtheme as you would any other theme within WordPress. Our modified header.php will be used instead of the default header.php and our style.css will be used to make changes to the default styling. You can add further changes to the styling by adding to the style.css file in the child theme. The Firebug extension for the Firefox browser is a quick way to experiment with making changes before adding the code to your style sheet.

Dragonfly: almost emerged

We spotted a dragonfly trying to emerge from its nymph skin but the nymph had not attached itself securely to a reed….

…and so it struggled to free itself…

Get the Flash Player to see this video.


Once freed it sat recuperating for a while; so I stopped filming and it immediately took off into the summer sky…. somedays nothing seems to go right.

Me (not) Mobile?

Have just enjoyed the 60 day trial of Mobile Me. Having a house full of Macs which will be joined, I do not doubt, at some time by an iPad all that syncing and sharing stuff is just the job. Mostly I was using the picture gallery which, combined with a dinky WordPress plugin, provided a quick link from here to there.

The trial expired but no payment was charged. Instead an email complaining that something was wrong with my card details…

…which was strange. I checked the details and all seemed, as far as I could see, to be correct but still it was rejected…

…which was strange because the details of the same card are stored at the Apple Store where it is used (far too) frequently…

One of their suggestions was to purchase a box from the Apple Store, have that delivered by snail mail, discard the disc and packaging into the recycle bin, and type in the included activation key. [W:Cloud computing] eh! It’s the future!

In the past I have purchased QuickTime Pro and Aperture activation keys from the Apple Store but alas a Mobile Me activation key is not availabe.

So, for now, I have given up and rolled my own using the Gallery software.. Perhaps not as pretty as Apple’s but it does the job. A bit of PHP in the widgets over there (->) adds an image and a link. A bit of FTP adds a straight through connection.

The email said they would keep the account active until the 12th June which is just after WWDC and some rumours say… that Mobile Me will be free anyway. Hmmm!