Last Modified Posts in WordPress
Want to show the last posts you updated in WordPress? This shows the posts you went back and updated or modified, which is different than your recent posts.
<?php
query_posts('showposts=10&orderby=modified&order=DESC');
if (have_posts())
{
echo '<h3>Last Modified Posts</h3>';
echo '<ul>' . "\n";
while (have_posts()) : the_post();
echo '<li>';
echo '<a href="' . get_permalink() . '">' . the_title('','', false) . '</a>';
echo '</li>' . "\n";
endwhile;
echo '</ul>';
}
?>
Is this available as a plugin? I want the default sort order of my blog to be “last modified.”
Mar 10, 2008 at 11:57 am • 1I wrote this as something to throw in your sidebar. I haven’t studied the WordPress Plugin API so I normally just do snippets of code or hacks.
Mar 11, 2008 at 9:35 am • 2