wordpress 设置特色图像

//开启特色图像
add_theme_support('post-thumbnails');

调用即可

其他参数: 一般用不到

the_post_thumbnail('thumbnail');       // Thumbnail (默认尺寸 150px x 150px max)
the_post_thumbnail('medium');          // Medium resolution (default 300px x 300px max)
the_post_thumbnail('large');           // Large resolution (default 640px x 640px max)
the_post_thumbnail('full');            // Full resolution (original size uploaded)
 
the_post_thumbnail( array(100,100) );  // Other resolutions