惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
D
Docker
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
F
Full Disclosure
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
L
LangChain Blog
H
Help Net Security
B
Blog
T
Tailwind CSS Blog
V
V2EX
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
美团技术团队
A
About on SuperTechFans
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
I
InfoQ
Project Zero
Project Zero
I
Intezer
Google DeepMind News
Google DeepMind News
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
C
Cyber Attacks, Cyber Crime and Cyber Security
G
GRAHAM CLULEY
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
S
Securelist
Recorded Future
Recorded Future
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 叶小钗
S
Security Affairs
Blog — PlanetScale
Blog — PlanetScale
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
The Hacker News
The Hacker News

winegrower | 种葡萄并酿酒的人 - 网络娱乐

修改博客主题 - winegrower 最近在折腾电脑 - winegrower | 种葡萄并酿酒的人 永久的博客 - winegrower | 种葡萄并酿酒的人 折腾10年前的网站 - winegrower | 种葡萄并酿酒的人 Less is more - winegrower 终于“胖”了 - winegrower | 种葡萄并酿酒的人 【WeCenter二次开发】问题、文章和活动使用不一样的分类 - winegrower | 种葡萄并酿酒的人 WeCenter 程序站内及站外调用功能 - winegrower | 种葡萄并酿酒的人 网站bug修复 - winegrower | 种葡萄并酿酒的人 网络社区 - winegrower | 种葡萄并酿酒的人
typecho博客文章按发布时间倒序排列 - winegrower | 种葡萄并酿酒的人
格子老师 · 2019-12-08 · via winegrower | 种葡萄并酿酒的人 - 网络娱乐

我有一个博客导航,是用Typecho程序驱动的,其中每个博客链接是TP中的每篇文章,因为博客导航是随着时间的推进在不断收录新的博客的,所以这样就会导致新收录的博客永远排在最早收录博客的前面。理论上而言,最早收录的博客相对于晚收录的博客具有优先曝光权,所以后收录的博客应该拍在后面。

博客树
但如何要实现这个功能呢?
1、每次发布文章都手动修改发布日期,让发布日期提前。但这个办法比较麻烦,且容易引起博客排列时间的混乱。
2、第二种是将typecho博客文章按发布时间倒序排列,这样就可以完美实现了。
具体修改代码如下:

这个需要修改typecho源文件一个
/var/Widget/Archive.php中第1260行

$select->order('table.contents.created', Typecho_Db::SORT_DESC)
修改成
$select->order('table.contents.created', Typecho_Db::SORT_ASC)