Display Recently Updated Posts

<?php

$today = current_time(‘mysql’, 1);
$number = 5; // number of posts

if($recentposts = $wpdb->get_results(“SELECT ID, post_title FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_modified_gmt < ‘$today’ ORDER BY post_modified_gmt DESC LIMIT $number”)):

?>

<h2><?php _e(“Recently Updated”); ?></h2>
< ul>
<?php
foreach($recentposts as $post) {
if($post->post_title == ”) $post->post_title = sprintf(__(‘Post #%s’), $post->ID);
echo ‘< li>< a rel=”nofollow” href=”‘.get_permalink($post->ID).'”>’.the_title().'</ a></ li>’;
} ?>
</ ul>
<?php endif; ?>


Updated Posts