<?php the_post_thumbnail(); ?>タグでアイキャッチ画像を表示すると以下のような形で img タグがHTMLに出力されます。 この img タグ内の width/height 指定やクラス名を任意のものへ変更したり、削除する方法のメモです。 img タグ内のサイズ指定を変更する the_post_thumbnail() に以下のように array( 橫, 縦 ) に表示したいサイズを渡します。 <?php the_post_thumbnail( array(200, 200) ); ?> これで以下のように img タグが変更されます。 独自のクラスを付ける the_post_thumbnail() タグの第二引数に以下のように任意のクラス(myClass の部分)を入れます。 <?php the_post_thumbnail( 'thumbnail', arra
![[WordPress] アイキャッチで出力される img タグ中のサイズやクラスを変更したり削除したりする](https://cdn-ak-scissors.b.st-hatena.com/image/square/9fffa04cf0902c71ea0b733c9cd94f510b361cff/height=288;version=1;width=512/https%3A%2F%2Fmemocarilog.info%2Fwp-content%2Fuploads%2F2012%2F10%2Fwp-orange-640x960.png)