私は最近ワードプレスのテーマを変更しました。新しいテーマに移行しようとしているカスタムページテンプレートがありますが、カスタムページテンプレートでエラーが発生しています。"未定義の関数post_image_thumbnail()を呼び出す"エラー
Fatal error: Call to undefined function
post_image_thumbnail()
in [link to custom page url] on line 55
私はそれがサムネイルをサポートしていない子のテーマかもしれないと思ったので、私は子供のテーマのfunctions.php
にこれを追加しました:
add_theme_support('post-thumbnails');
しかし、それは何も解決しませんでした。
誰かが私のコードをデバッグするのに役立つでしょうか?たぶん私は見ることができない構文エラーがありますか?
<h3><?php echo get_cat_name(26);?></h3>
<?php query_posts(array('category__and'=>array(75,26),'meta_key'=>'wpcf-sortname','orderby'=>'meta_value','order'=>ASC,'posts_per_page' => -1));if (have_posts()) while (have_posts()) : the_post(); ?><div class="indentlist"><?php post_image_thumbnail(); ?><div style="clear:both;"></div><a href="<?php the_permalink() ?>" class="participants"><?php the_title(); ?></a></div><?php endwhile; // end of the loop. ?>
ありがとうございます!
感謝をありがとう
:P私は、次のコードを追加します君は!私は両方のオプションを試してみます。 – butterscotch
サムネイルに適用されたfunctions.phpコードをコピーして動作しています。どうもありがとうございます! – butterscotch