本文标签: wordpress
通过Wordpress伪静态机制,你可以将你的博客地址设置成任意你想要的URL形式,形如:/168.html,你需要设置成 /%post_id% .html,当然,你也可以把.html去掉,则地址成了目录形式/168/,或者你也可以把%post_id%换成%postname%。以下是官方提 供的变量可供选择,基本上可以满足你对URL形式的需求了。
- %year%
- The year of the post, four digits, for example 2004
- %monthnum%
- Month of the year, for example 05
- %day%
- Day of the month, for example 28
- %hour%
- Hour of the day, for example 15
- %minute%
- Minute of the hour, for example 43
- %second%
- Second of the minute, for example 33
- %postname%
- A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So “This Is A Great Post!” becomes this-is-a-great-post in the URI (see Using only %postname%)
- %post_id%
- The unique ID # of the post, for example 423
- %category%
- A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.
- %tag%
- A sanitized version of the tag name (tag slug field on New/Edit Tag panel).
- %author%
- A sanitized version of the author name.
%year%
文章发表的年份,四位数,如 2004
%monthnum%
月份,如 05
%day%
天,如 28
%hour%
小时,如 15
%minute%
分钟,如 43
%second%
秒,如 33
%postname%
文章标题的别名 (编辑文章/页面时的别名栏)。对于文章标题为 “This Is A Great Post!” 的%postname%是this-is-a-great-post(查看 仅仅使用 %postname%)。 出于性能原因,强烈不建议使用%postname%作为链接地址的开头。 *** 注 - 从WordPress 2.0开始这条建议可以无视了。
%post_id%
文章的唯一ID,如 423
%category%
分类的别名 (新建/编辑分类时的别名栏)。 有层级关系的类型在链接地址里就像有层级的目录。 出于性能原因,强烈不建议使用%category%作为链接地址的开头。
%tag%
标签的别名(新建/编辑标签时的别名栏)。 出于性能原因,强烈不建议使用%tag%作为链接地址的开头。
%author%
作者的别名。
声明: 本文由( liva )原创编译,转载请保留链接: wordpress 地址静态化
- 上一篇:ubuntu 下 openvpn的配置
- 下一篇:linux 时间修改
wordpress 地址静态化:等您坐沙发呢!
发表评论
