ループ内で the_modified_date() や the_modified_time() を使って更新日時が取得できる。
公開日と更新日が違う場合だけ表示するように、テンプレートに以下を追加する。
<?php if (get_the_modified_date('Y-m-d') != get_the_time('Y-m-d')) : ?>
更新: <?php the_modified_date('') ?>
<?php endif; ?>
更新日時順に記事を取得する
get_posts()(日本語版はorderbyのパラメータが間違っているみたい)でパラメータに「orderby=modified」を指定すると、更新日時順に記事を取得できる。
<?php foreach(get_posts('orderby=modified') as $post) : ?>
<a href="<?php the_permalink() ?>"><?php the_title(); ?> [<?php the_modified_date("n/j"); ?>]</a>
<?php endforeach; ?>
トラックバックURL