The free version of the Branford Magazine theme is no longer offered or supported by the author. However, it is a very useful theme for those who want a Magazine style layout without spending money on a Premium theme. A few people, including one of our hosted WordPress clients, were having problems with the timthumbs automatic image resizing that comes with this theme and a few others eg Arthemia / Mimbo. Rather than spend time looking into the problem we suggested updating the theme to take advantage of WordPress’ own internal thumbnail generation tools.


This was a quick job and we thought we would share it for those looking to do the same. This also works with any timthumb dependent theme and as you can see is straight forward.

Step 1
Open functions.php add

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 50, 50, true ); // 50 pixels wide by 50 pixels tall, hard crop mode
add_image_size( 'headline-thumbnail', 300, 275, true ); // headline category thumbnail size
add_image_size( 'featured-thumbnail', 100, 65, true ); // featured category thumbnail size
add_image_size( 'spoiler-thumbnail', 150, 150, true ); // spoiler category thumbnail size

before the closing ?>

Step 2

in index.php

find

<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php postimage(255,90); ?></a>

and change to

<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_post_thumbnail( 'featured-thumbnail' ); ?></a>

That takes care of the featured section next

find

 <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php postimage(255,90); ?></a>

and replace with

<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_post_thumbnail( 'featured-thumbnail' ); ?></a>

in ui.tabs.php

find

<a href="<?php the_permalink() ?>" class="alignleft" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php postimage(300,200); ?></a>

replace with

<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
	<?php the_post_thumbnail( 'headline-thumbnail' ); ?></a>

somewhere in style.css
add

.attachment-headline-thumbnail {
	float:left; margin:10px;
}

.attachment-featured-thumbnail {
	float:left;
	}

.attachment-spoiler-thumbnail {	float:left;
	}

Next, edit each page / article to ensure that they all have a Featured Image (look for the cunningly titled Featured Image box which should now appear on the bottom right hand column)

If you are finding that your images are not keeping their correct aspect ration install and run the “Regenerate thumbnails” plugin.

Please note

If you are using wordpress 3.0+ you may have noticed that the centre column no longer shows the Category from which the articles are extraction.. to fix this

open index.php and find

	    $wp_query->is_category = false;

and change to

$wp_query->is_category = true;

References:
Regenerate Thumbnail plugin details
Post thumbnails and Arthemia by proto|mondo
Branford magazine origianlly by Michael Oeser For the record our client is using the Free version 3.0.