Blog, Graphics, WordPress

The new site goes live, mostly

So most people that know me will know that I’ve been working on this version of the site on and off for at least a couple of years. Typical web designer story - too busy with client work to finish my own site. Not that I’m complaining, mind.

3 years after the final Photoshop comp it’s sliced, templated and ported into WordPress as the design you see here today. I would have thought that 3 years down the line this design would look a little dated, but I’m pleased to say I’m still enjoying it. For the moment.

You’ll notice that a few areas are still a little rough around the edges. I can but apologise. The gallery has been through at least 5 incarnations, beginning life as Gallery2, then Flickr, then the awesome NextGEN Gallery plugin, then 2.5’s built-in gallery function, and then back to NextGEN again. The same could be said of the portfolio, and these are areas that I will be improving over the next few weeks for sure. Also - apologies for the few validation errors - unescaped ampersands are the bane of my existence of late.

In other news, there’s loads of other news. Life is going swimmingly and I’ve some big announcements to make soon.

Hacking the WP-Imagefit Plugin

It’s actually surprisingly easy to make work with non-hAtom-based themes (i.e. the Default theme).

How do I do it then?

First things first, ensure your posts are wrapped in a block element that has a class, for instance the Default theme wraps each post in a <div class="post">.

Open wp-imagefit.php and on line 20, change:

jQuery('.hentry').imagefit();\n to jQuery('.post').imagefit();\n

Obviously replace .post with the class you used in your HTML. I’ve only tested this on a custom theme and the Default theme but it seems to work fine for me.

Hope it helps other people.

Alternatively, if you’d rather edit your theme than the plugin, simply edit your theme templates to wrap each post in a <div class="hentry">

Sidenote to plugin author

Excellent plugin, thank you for making it. At some point you could rewrite this so that the plugin automatically injects a <div class="imagefit"> around each entry in the loop, then call that class in the jQuery instead. Limiting this to hAtom only themes seems unneccesary to me.

Link: http://wordpress.org/extend/plugins/wp-imagefit/