创建自定义字段-large\\u特色。如果该值=1,将显示较大的标准尺寸。Else-中等。
$large_featured = get_post_meta( $post->ID, \'large_featured\', true );
if(!empty($large_featured) && $large_featured == \'1\') {
the_post_thumbnail(\'large\');
} else {
the_post_thumbnail(\'medium\');
}
通过在函数中添加此项,可以专门为主页创建其他图像大小。php:
add_image_size( \'homepage-large\', 620, 620);