wordpress文章缩略图大小的设置

  • A+
所属分类:Wordpress

打开functions.php文件,加入下面的代码:

if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 50, 50, true ); // Normal post thumbnails
add_image_size( 'my-custom-size', 405, 180, true );
}

就可以自己定义文章缩略图的大小了。

avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: