PHPCMS V9相关文章无法排序解决办法(增加order排序)

修改方法:

打开根目录下的phpcms/modules/content/classes/content_tag.class.php,找到

$r = $this->db->select($sql2, '*', $limit, '','','id');

修改为:

$r = $this->db->select($sql2, '*', $limit, $order, '','','id');

PC标签格式如下:

{pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" order="inputtime DESC" keywords="$rs[keywords]"}

按发布时间排序:order="inputtime DESC"

按ID降序排序:order="id DESC"

按自己的需求对order排序类型作调整,更新一下系统缓存,就OK了。

最后修改:2022 年 09 月 21 日
如果觉得我的文章对你有用,请随意赞赏