View page: <http://easun.org/archives/how_entry_ontop.html>
------------------------------------------------------------------------
entry Title: [MT Tips]如何让某个日志在Blog首页固顶?
Publish Date: 2008年9月27日 20:47
------------------------------------------------------------------------
------------------------------------------------------------------------
貌似最简单的办法就是修改日期到一个很遥远的日期�¼
�比如 AnySQL 那样:)
但是带来的问题的很多,比如导致Feed阅读器犯糊涂或è
��影响搜索引擎的收录等等,更糟糕的是对于
日志来说,最主要的就是发布日期。也许大家都已经�
�现了,我的主页模仿 MT Forum
搞了一个固顶日志(也是为了风格统一)出来,这个�›
�顶日志是后台通过自己设置实现的。是怎么设置的。ç
��案是利用 <mt:Entries> 的tags 功能。
具体概念代码如下:<mt:Entries tag="@top"
sort_by="authored_on" sort_order="descend" limit="1"
blog_ids="1,5"> dosthing.....</mt:Entries>
这样我们只要要在固定的主题 加上 tag ,tag 名字为
@top 就可以了。
PS: @开头的tag属于隐藏 tag,不会在发布页面显示出来。
------------------------------------------------------------------------
You are receiving this email either because you have elected to receive notifications about new content on WebBlog:路杨, or the author of the post thought you would be interested. If you no longer wish to receive these emails, please contact the following person:
路杨 <easu...@Gmail.com>