月ごとに投稿を表示するループを作成しようとしています。DB から post_content を抽出するのに助けが必要です。wpdb を使用して、残りの投稿情報をすべて正常に取得しました。post_title と同じように post_content を試しましたが、うまくいきません。
ここに私が取り組んでいるサンプルページがあります。 http://asg.websolutionshack.com/events/
<div id="events" class="full">`
<?php
$months = $wpdb->get_results("SELECT DISTINCT MONTH(post_date) AS month , YEAR(post_date) AS year FROM $wpdb->posts WHERE post_status = 'publish' and post_date <> now() and post_type = 'event' GROUP BY month, year ORDER BY post_date DESC");
$posts = $wpdb->get_results("SELECT id, post_title, post_content, MONTH(post_date) AS month , YEAR(post_date) AS year , DAY(post_date) AS day FROM $wpdb->posts WHERE post_status = 'publish' and post_type = 'event' ORDER BY post_date DESC");
foreach($months as $this_month){ ?>
<div class="month_block">
<h2 class="month"><?php echo date("F", mktime(0, 0, 0, $this_month->month, 1, $this_month->year)); ?> <?php //echo $this_month->year; ?></h2>
<?php for ($i = 0; $i <= count($posts); $i++){?>`
<div class="entry">
<?php if(($this_month->year == $posts[$i]->year)&&($this_month->month == $posts[$i]->month)){?>
<span><?php echo $posts[$i]->month ?>.<?php echo $posts[$i]->day ?>.<?php echo $posts[$i]->year ?></span><h3><?php echo $posts[$i]->post_title; ?></h3>
<p><<?php echo $posts[$i]->post_content; ?><a href="<?php echo get_permalink($posts[$i]->id); ?>">Details ></a></p>
<?php } ?>
</div><!-- entry -->
<?php } ?>
</div><!-- month -->
`
あなたが私に提供できるかもしれない洞察をありがとう。