こちらのサイトに書いてある通りですが、備忘録。
the_content()
といくら書いてもNullだったのですが、このようにすると、記事部分が表示されます。
Get wordpress post content by post id – WordPress – Stack Exchange
”$post->ID”で、記事のIDは取得できるとの、このようなコードにしました。
$my_postid = $post->ID ;
$content_post = get_post($my_postid);
$content = $content_post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;