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

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

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)