Change theme’s thumbnail to cropped WP featured image

The theme I’m using, when browsing a particular category, displays the full featured image (even if it’s more than 1000px high), resized to max-width:20%. However, I’d like it to display just a cropped thumbnail that was autogenerated by WordPress. Here’s the relevant code:

while (have_posts()) : the_post();
    $thumb = get_post_thumbnail_id(); 
    $full_thumb = wp_get_attachment_image_src( get_post_thumbnail_id ( get_the_ID() ), 'original') ;

    echo '<article class="search-entry clearfix">';

    if ( $thumb ) {
        $image = hb_resize( $thumb, '', 215, 140, true );
        echo '<a href="'.get_permalink().'" title="'.get_the_title().'" class="search-portfolio-thumb"><img src="'.$image['url'].'" /></a>';
    }

Is it possible? Could you help me find a way to do this?

Thank you!

Read more here: Change theme’s thumbnail to cropped WP featured image

Leave a Reply

Your email address will not be published. Required fields are marked *