The wp theme I am using has a featured section on the front page. It pulls an article from a specified category and pulls the related photo too.
The problem is that it's set to pull the 'thumbnail' image which is set up in the custom field. I don't want it to. All my thumbnail images are 200px wide and so when they appear in the featured section they are reproduced too bog and are all pixelated.
What I would like to do is set up another custom field called 'featured' and ask the featured section to pull its image from there instead. How do I do that?
Here is the relevant code from my theme:
<a href="#">
<?php unset($photo);
$photo = catch_that_image (get_the_id(), '', '');
if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
the_post_thumbnail(array(60,9999, true));
}
else{
if ($wpzoom_cf_use == 'Yes')
{
$photo= get_post_meta($post->ID, $wpzoom_cf_photo, true);
} // if CF used
else
{
if (!$photo)
{
$photo = catch_that_image($post->ID);
}
} // if CF not used
if ($photo)
{
?>
<img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?w=60&h=50&zc=1&src=<?php echo $photo; ?>" alt="<?php the_title(); ?>" />
<?php
}
else
{
echo"<img src=\""; bloginfo('template_directory'); echo"/images/blank2.jpg\" />";
} // if $photo still does not exist
} // if theme does not have a thumbnail
?> </a>
`
I think it should be quite simple, but I tried a few things and only managed to mess up my theme. I don't know php so it's easy fro me to go wrong - any ideas?