だから私は「イベント」と呼ばれるカスタム投稿タイプを持っています。各イベントで、「08/01/12」のような日付を返す「start_time_date」というカスタムフィールドがあります。これらの投稿を並べ替えて投稿を返すには、投稿がstart_time_dateで昇順で並べ替えられるようにするにはどうすればよいですか(現在の日付に近いstart_time_datesが最初に表示されます)。
これが私の現在のコードです:
<? query_posts("cat=$currentID&showposts=100"); ?>
<? if ( have_posts() ) : ?>
<? while ( have_posts() ) : the_post(); if (time() < strtotime(get('end_time_date'))) :?>
<? $originalDate = get('start_time_date'); $newDate = date("M j, Y", strtotime($originalDate)); ?>
<div class="post">Some Post Data</div>
<? endif; endwhile; ?>
<? endif; ?>