简体   繁体   中英

wordpress resizing add_image_size properly

I am trying to change the size of a thumbnail in wordpress, but it keeps making it exactly square even though I want to stretch the width moreso than the height. Im not sure why this doesnt work. Any help would be great In functions I have

// Used for large feature (header) images.
add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true );
// Used for featured posts if a large-feature doesn't exist.
add_image_size( 'small-feature', 500, 300 );

and below

if ( function_exists( 'add_image_size' ) ) { 
add_image_size( 'results-thumb', 70, 55, true); 

}

and where im calling the thumbnail...

<?php echo the_post_thumbnail('results-thumb'); ?>

Heres the site, at the bottom in the latest results section you'll see the thumbnails.. http://limerickfc.hailstormcommerce.com/cms/

Ok, I just fixed it with css workaround by applying a min-width rule to the containing div, although Im still not sure this is the best way to go about it. But I wont accept the answer yet as Im sure Ill run into this situation again

You probably need to regenerate the sizes. Try installing and running this plugin http://wordpress.org/extend/plugins/regenerate-thumbnails/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM