在functions.php 中開啟WordPress的自帶縮圖功能。
[code type=php]
< ?php// 支援 WordPress 2.9 的自帶縮圖功能
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
}
?>[/code]
在 index.php 中的the_content 之前添加以下代碼
[code type=php]< ?php if ( has_post_thumbnail() ) : ?>
Leave a Reply