设置WordPress中缩略图的大小

2010年11月12日11:30:00网站建设评论1,538

WordPress文章中经常会出现一些缩略图,如果这些缩略图大小不一可能会影响博客的美观,你可以通过以下的方法调整博客中缩略图的大小,是你的博客变得美观漂亮。文章源自堕落的鱼-https://www.duoluodeyu.com/573.html

打开functions.php文件,加入下面的代码:文章源自堕落的鱼-https://www.duoluodeyu.com/573.html

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 );
}
文章源自堕落的鱼-https://www.duoluodeyu.com/573.html
匿名

发表评论

匿名网友 填写信息

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

确定