0

我正在尝试更改 wordpress 中缩略图的大小,但即使我想拉伸宽度而不是高度,它仍然保持完全正方形。我不确定为什么这不起作用。任何帮助都会很棒在我拥有的功能中

// 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 );

及以下

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

}

我在哪里调用缩略图...

<?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/

4

2 回答 2

0

您可能需要重新生成大小。尝试安装和运行这个插件http://wordpress.org/extend/plugins/regenerate-thumbnails/

于 2012-09-27T10:30:06.183 回答
0

好的,我只是通过min-width对包含的 div 应用规则来使用 css 解决方法修复它,尽管我仍然不确定这是解决它的最佳方法。但我不会接受答案,因为我确定我会再次遇到这种情况

于 2012-09-27T10:17:33.330 回答