I have one question about The Book "Build Your Own Wicked Wordpress Theme"
in chapter 5 about post-thumbnail section.
I have followed the code in function.php given by Raena.

PHP Code:
add_theme_support('post-thumbnails');
set_post_thumbnail_size(540, 300, true);
add_image_size('homepage-thumbnail', 300, 200, true);

function wicked_indexloop() {
    query_posts("posts_per_page=4");
    $counter = 1;
    if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    <?php thematic_postheader();
    
    if (
$counter == && has_post_thumbnail() && !is_paged()) {
        
the_post_thumbnail('homepage-thumbnail');
    } 
?>
    
    <div class="entry_content">
    <?php the_excerpt(); ?>
    <a href="<?php the_permalink(); ?>" class="more"><?php echo more_text() ?></a>
    <?php $counter++; ?>
    </div>
    
    </div>
<!--.post-->    
    <?php endwhile; else: ?>
    <h2>Yaiks</h2>
    <p>There are no post to show!!</p>
     
    <?php endif;
    
wp_reset_query();
}
No Thumbnail shows on the Homepage, but If I change the add_theme_support to


PHP Code:
if (function_exists ('add_theme_support')) {
    
add_theme_support('post-thumbnails');
    
set_post_thumbnail_size(540300true);
    
add_image_size('homepage-thumbnail'300200true);


and remove the $counter = 1; also remove $counter == 1 And && !is_paged()
the thumbnail appear on the homepage but it resized the image proportionally not crop it.

Can anybody help me.
Any advice would be pleased

Thanks in advanced