そっか!!
$tax_posts as $post
とすればいいのですね!
(リセットは書いていたのですが、こちらにコピペし忘れておりました。)
初歩的なことが分かっておらず、お手間をおかけ致しました。
ご飯のページにお酒のサムネイルが出るようになりました。
ほんとうにありがとうございました!!
早速のお返事ありがとうございます!
1. catch_that_imageはfunction.phpに以下のソースを書いています。他のページではうまく行っているので、$tax_postをどうにか渡す必要があるのかなと思いますが分かりません
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
if(empty($first_img)){ //Defines a default image
$first_img = "/common/images/thumbnail.gif";
}
return $first_img;
}
2. 日付を出力するコードを変えて、思い通りに表示できました!
<?php echo esc_html($tax_post->post_date, 'Y.m.d'); ?>
↓
<?php echo mysql2date('Y.m.d', $tax_post->post_date); ?>