By updated, I assume you mean edited?
Ok, just for fun, I decided to see if I could do this. On one of my sites, I have been using a Recent Posts hack. So I modified it to pull posts where the post_date < post_modified. At first I got an error but then I edited a post (in case there were none for it to pull!) and it seems to work. See here: http://moltenwords.net/pp101/ It says Recent Posts, but I didn’t change that.
Here is the code I used:
<?php
function get_edited_posts($no_posts = 5, $before = '
- ', $after = '
', $show_pass_post = false, $skip_posts = 0) {
global $wpdb, $tableposts;
$request = "SELECT ID, post_title FROM $tableposts WHERE post_date < post_modified ";
if(!$show_pass_post) { $request .= "AND post_password ='' "; }
$request .= "ORDER BY post_date DESC LIMIT $skip_posts, $no_posts";
$posts = $wpdb->get_results($request);
$output = '';
foreach ($posts as $post) {
$post_title = stripslashes($post->post_title);
$permalink = get_permalink($post->ID);
$output .= $before . '' . $post_title . '' . $after;
}
echo $output;
}
?>
It would go in your my-hacks file, then on the index.php you would need to include <?php get_edited_posts(); ?> where you want them to be.
This is my first attempt at modifying anything like this, so I make no guarantees. 🙂
Thread Starter
shadow
(@shadow)
Thanks Oriecat:)
I will have a play with it later today and see how it goes.