使最新修改的文章排在最前面
在模板函数 (functions.php)中添加:
// sort by modify time
function order_posts_by_mod_date($orderby)
{
if (is_home() || is_archive() || is_feed())
{
$orderby = "post_modified_gmt DESC";
}
return $orderby;
}
add_filter('posts_orderby', 'order_posts_by_mod_date', 999);