【问题标题】:wordpress resizing add_image_size properlywordpress 正确调整 add_image_size 的大小
【发布时间】:2012-09-19 02:26:13
【问题描述】:

我正在尝试更改 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'); ?>

这里是网站,在最新结果部分的底部,您会看到缩略图。. http://limerickfc.hailstormcommerce.com/cms/

【问题讨论】:

    标签: php image wordpress


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多