ページの更新情報一覧を表示する

<div>
<h2>更新情報</h2>
<div>
<ul>
<?php
$recentposts = query_posts($query_string."&post_type=page&orderby=modified&showposts=5");
if($recentposts): foreach($recentposts as $post): setup_postdata($post);
?>
<li><small><?php the_modified_time('Y/n/j'); ?>:</small> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endforeach; else : ?>
<li>更新された情報はありません.</li>
<?php endif; ?>
</ul>
</div>
</div>