The code below is part of timthumb, it calls the meta data from the post and if the custom field has "thumb" it will display my thumbnail and link it to the post. I simply want to add an additional parameter that checks which category is linked to the post.
I tried adding
&& ( in_category( 'sponsored-events' )) but I keep getting a syntac error. I'm not program savy, so please break it down in lames terms
The the get meta data, and consiquently adding the catagory filter is on the 2nd line of code,
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( get_post_meta($post->ID, 'thumb', true) ) { ?>
<div class="postthumb" style="display:inline; padding:5px;">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" width="100" height="100" /> </a>
</div>
<?php } ?>
<?php endwhile; ?>