アイキャッチ画像が指定したサイズで表示されません。
-
Twenty Tenを使用しています。
トップページに特定のカテゴリのアイキャッチを表示しようとしていますが、表示は何とかされるようになったのですが、サイズが元画像のサイズで表示されてしまいます。functions.phpに
add_theme_support(‘post-thumbnails’);
set_post_thumbnail_size(160, 106, true);index.phpに
<div id=”container”>
<div id=”content” role=”main”>
<div class=”jirei-top”>
<?php
query_posts(‘posts_per_page=4&category_name=04’);
if(have_posts()):
$count = 1;
while(have_posts()):
the_post();
if($count % 2 > 0 && $count != 1):
?>
</div>
<div class=”jirei”>
<?php
endif;
?>
<article class=”jirei-article”>
<h1 class=”jirei-title”>“title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></h1>
<time class=”jirei-date” datetime=”<?php the_time(‘Y-m-d’); ?>”><?php the_time(get_option(‘date_format’)); ?></time>
“><?php the_post_thumbnail(‘post-thumbnail’,array(‘alt’ => the_title_attribute(‘echo=0′),’title’ => the_title_attribute(‘echo=0’))); ?>
<?php the_excerpt(); ?><span class=”jirei-link”>“>続きを読む</span>
</article>
<?php
$count++;
endwhile;
endif;
wp_reset_query();
?>
</div>
</div>
</div>と記述してみましたが、横160×縦106になってくれません。WPをはじめたばかりで、ネットや本を参考に半信半疑で記述しています。
どなたかわかりますでしょうか?宜しくお願い致します。
- トピック「アイキャッチ画像が指定したサイズで表示されません。」には新たに返信することはできません。