重新排列WordPress评论显示顺序

  • 酉灿
  • WordPress
  • Jul 23, 2021

WordPress评论显示默认是倒序显示,新的在下面旧的在上面,不符合正常习惯,如果评论较多,查看非常麻烦。
对此,可以通过修改comment-template.php文件,重新排列顺序。
具体方法
进入WordPress安装目录,在wp-includes文件夹中,找到comment-template.php文件,打开并查找代码:
ORDER BY comment_date 共有三个地方 在后面加上 DESC保存即可。
例如: ORDER BY comment_date DESC"
打赏