Typecho根据最后编辑时间排序文章

默认的Typecho排序方式是根据发布时间,以下方法为根据最后编辑时间排序文章

varWidgetArchive.php ,1387-1393

可以看到文章排序代码

    /** 仅输出文章 */
    $this->_countSql = clone $select;

    $select->order('table.contents.created', Typecho_Db::SORT_DESC)
    ->page($this->_currentPage, $this->parameter->pageSize);
    $this->query($select);
}

将其中的 table.contents.created 改为 table.contents.modified

声明:本文来自互联网或用户投稿,该文观点仅代表作者本人,不代表本站立场。文章及其配图仅供学习和交流之用,版权归原作者所有,如有内容侵权或者其他违规问题,请联系本站处理。

相关文章