站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Template Tags/next post link
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
Fludlen
(
讨论
|
贡献
)
2008年7月10日 (四) 11:28的版本
(
差异
)
←上一版本
|
最后版本
(
差异
) |
下一版本→
(
差异
)
跳转至:
导航
、
搜索
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
== Description == == 描述 == Used on single post [[WordPress:Glossary#Permalink|permalink]] pages, this template tag displays a link to the next post which exists in chronological order from the current post. 这个模板标签用在一篇单一的文章[[WordPress:Glossary#Permalink|permalink]]网页上,显示一个链接,链接到后一篇文章,后一篇文章指的是在发表时间在当前文章之后。 This tag must be used in [[WordPress:The Loop]]. 必须在[[WordPress:The Loop|The Loop]]内使用这个标签。 == Usage == == 用法 == %%% <?php next_post_link('format', 'link', in_same_cat, 'excluded_categories'); ?> %%% %%% <?php next_post_link('format', 'link', in_same_cat, 'excluded_categories'); ?> %%% == Examples == == 用法 == ===Default Usage=== ===默认用法=== Displays link with the post title of the next post (chronological post date order), followed by a right angular quote (»). By default, this tag works like [[WordPress:Next Post]] 显示后一篇文章的文章标题(按文章日期的时间顺序排列在后的一篇文章),紧跟着一个右angular quote («)。默认情况下,这个标签像[[WordPress:Next Post|后一篇文章]]一样运行。 <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|Next Post Title »]]</div> <pre><?php next_post_link(); ?></pre> <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|后一篇文章标题»]]</div> <pre><?php next_post_link(); ?></pre> ===Bold Post Title As Link=== ===粗体的文章标题作为链接=== Displays link with next chronological post's title wrapped in 'strong' tags (typically sets text to bold). 显示链接,将时间上较后的文章标题包裹在'strong'标签中(通常将文本设置为粗体的)。 <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|<strong>Next Post Title</strong>]]</div> %%% <?php next_post_link('<strong>%link</strong>'); ?> %%% <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|<strong>下一篇文章标题</strong>]]</div> %%% <?php next_post_link('<strong>%link</strong>'); ?> %%% ===Text As Link, Without Post Title, Within Same Category=== ===文本作为链接,没有文章标题,在相同的类别中=== Displays custom text as link to the next post within the same category as the current post. Post title is not included here. "Next post in category" is the custom text, which can be changed to fit your requirements. 显示自定义的文本作为链接,链接到与当前文章同类别的后一篇文章。不包含文章标题。"类别中的后一篇"是自定义文本,可以根据的你的需要更改。 <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|Next post in category]]</div> <tt><?php next_post_link('%link', 'Next post in category', TRUE); ?></tt> <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|类别中的后一篇]]</div> <tt><?php next_post_link('%link', 'Next post in category', TRUE); ?></tt> ===Within Same Category, Excluding One=== ===在同一个类别中,一个类别除外=== Displays link to next post in the same category, as long as it is not in category 13 (the category ID #). You can change the number to any category you wish to exclude. Exclude multiple categories by using "<tt> and </tt>" as a delimiter. 显示链接,链接到同一个类别中的后一篇文章,只要这篇文章不属于类别13(类别ID#)。你可以将数字改为任何你想要排除的类别。使用"<tt> and </tt>"作为分隔符可以删除多个类别。 <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|Next post in category]]</div> <tt><?php next_post_link('%link', 'Next post in category', TRUE, '13'); ?></tt> <div style="border:1px solid blue; width:50%; padding:10px">[[WordPress:#Examples|类别中的下一篇文章]]</div> <tt><?php next_post_link('%link', 'Next post in category', TRUE, '13'); ?></tt> == Parameters == == 参数 == ; format : (''string'') Format string for the link. This is where to control what comes before and after the link. <tt>'%link'</tt> in string will be replaced with whatever is declared as <tt>'link'</tt> (see next parameter). <tt>'Go to %link'</tt> will generate "Go to <a href=..." Put HTML tags here to style the final results. Defaults to <tt>'%link &raquo;'</tt>. ;格式:(''string'')链接的格式字符串。这个字符串控制了链接前后可以出现什么。字符串中的<tt>'%link'</tt>会被称为<tt>'链接'</tt>的任何内容所取代(请看看下一个链接)。<tt>'进入%链接'</tt>会产生"进入 <a href=..."在这儿放上HTML标签,设计最后的结果。默认为<tt>'%link &raquo;'</tt>。 ; link : (''string'') Link text to display. Defaults to next post's title (<tt>'%title'</tt>). ;链接:(''string'')显示的链接文本。默认为下一篇文章的标题(<tt>'%标题'</tt>)。 ; in_same_cat : (''boolean'') Indicates whether next post must be within the same category as the current post. If set to <tt>TRUE</tt>, only posts from the current category will be displayed. Options are: ; in_same_cat : (''boolean'')暗示下一篇文章是否必须与当前的文章在同一个类别中。如果设置为<tt>正确的</tt>,只有来自当前类别的文章才会得到显示。选项是: :* <tt>TRUE</tt> :* <tt>FALSE</tt> (Default) :* <tt>正确的</tt> :* <tt>错误的</tt> (默认) ; excluded_categories : (''string'') Numeric category ID(s) from which the next post should not be listed. Separate multiple categories with <tt>and</tt>; example: <tt>'1 and 5 and 15'</tt>. There is no default. ; excluded_categories : (''string'')下一篇文章不应该列出的类别ID。用<tt>和</tt>分开多个类别;例如:<tt>'1 和 5 和 15'</tt>。没有默认设置。 : In Wordpress 2.2, apparently, concatenating multiple categories for exclusion is done with a comma, not <tt>and</tt>; example: <tt>'1, 5, 15'</tt>. Still no default. 在WordPress2.2版本中,很显然,是用逗号链接几个将要删除的类别,而不是用<tt>和</tt>;例如:<tt>'1, 5, 15'</tt>。仍然没有默认设置。 == Related == == 相关的== See also [[WordPress:Template Tags/previous_post_link|previous_post_link()]]. 也看看[[WordPress:Template Tags/previous_post_link|previous_post_link()]]。 {{Tag Post Tags}} {{PHP Function Tag Footer}} {{标签文章标签}} {{PHP函数标签页底文字}}
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
模板:PHP函数标签页底文字
(
编辑
)
模板:标签文章标签
(
编辑
)