WordPress: Template Tags/previous posts link:修订间差异
(新页面: == Description == This creates a link to the next posts. Yes, it says "previous posts," but it's named that just to confuse you. == Usage == %%% <?php previous_posts_link('Label', 'Max ...) |
无编辑摘要 |
||
第1行: | 第1行: | ||
== Description == | == Description == | ||
== 描述 == | |||
This creates a link to the next posts. Yes, it says "previous posts," but it's named that just to confuse you. | This creates a link to the next posts. Yes, it says "previous posts," but it's named that just to confuse you. | ||
这个标签创建一个链接,链接到下一篇文章。对,显示"上一篇文章,"但是那样命名只会使你糊涂。 | |||
== Usage == | |||
== 用法 == | |||
%%% <?php previous_posts_link('Label', 'Max number of pages (default 0)'); ?> %%% | |||
%%% <?php previous_posts_link('Label', 'Max number of pages (default 0)'); ?> %%% | %%% <?php previous_posts_link('Label', 'Max number of pages (default 0)'); ?> %%% | ||
第9行: | 第14行: | ||
===Default Usage=== | ===Default Usage=== | ||
== 例子== | |||
==默认用法 == | |||
===Working example=== | ===Working example=== | ||
===Working 例子=== | |||
<?php previous_posts_link('« Previous Entries', '0') ?> | <?php previous_posts_link('« Previous Entries', '0') ?> | ||
<?php previous_posts_link('« Previous Entries', '0') ?> | |||
== Parameters == | == 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>. | ; 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>'link'</tt>的任何内容所取代(请看看下一个参数)。<tt>'Go to %link'</tt>会产生"Go to <a href=..."在这里放上HTML 标签,设计最后的结果。默认为<tt>'%link &raquo;'</tt>。 | |||
; link : (''string'') Link text to display. Defaults to next post's title (<tt>'%title'</tt>). | ; link : (''string'') Link text to display. Defaults to next post's title (<tt>'%title'</tt>). | ||
;链接:(''string'')显示的链接文本。默认为下一篇文章的标题(<tt>'%title'</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'') 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: | ||
;在_同一个_cat中:(''boolean'')暗示下一篇文章是否需要与当前的文章属于同一个类别。如果设置为<tt>正确的</tt>,只会显示来自当前类别的文章。选项是: | |||
:* <tt>TRUE</tt> | :* <tt>TRUE</tt> | ||
:* <tt>FALSE</tt> (Default) | :* <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'') 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. | ||
;删除的_类别 : (''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. | : 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 == | == Related == | ||
== 相关的 == | |||
See also [[WordPress:Template Tags/next_posts_link|next_posts_link()]] and | See also [[WordPress:Template Tags/next_posts_link|next_posts_link()]] and | ||
[[WordPress:Template Tags/previous_post_link|previous_post_link()]]. | [[WordPress:Template Tags/previous_post_link|previous_post_link()]]. | ||
也看看[[WordPress:Template Tags/next_posts_link|next_posts_link()]] 和 | |||
[[WordPress:Template Tags/previous_post_link|previous_post_link()]]。 | |||
{{PHP Function Tag Footer}} | {{PHP Function Tag Footer}} | ||
{{Stub}} | |||
{{PHP函数标签 页底文字}} | |||
{{Stub}} | {{Stub}} |
2008年7月5日 (六) 17:31的版本
Description
描述
This creates a link to the next posts. Yes, it says "previous posts," but it's named that just to confuse you. 这个标签创建一个链接,链接到下一篇文章。对,显示"上一篇文章,"但是那样命名只会使你糊涂。
Usage
用法
%%% <?php previous_posts_link('Label', 'Max number of pages (default 0)'); ?> %%%
%%% <?php previous_posts_link('Label', 'Max number of pages (default 0)'); ?> %%%
Examples
Default Usage
例子
默认用法
Working example
Working 例子
<?php previous_posts_link('« Previous Entries', '0') ?>
<?php previous_posts_link('« Previous Entries', '0') ?>
Parameters
参数
:在WordPress2.2中,很显然,要删除多个类别,使用逗号连接这些类别的,而不是用和;例如:'1, 5, 15'。仍然没有默认值。 -->
Related
相关的
See also next_posts_link() and previous_post_link().
也看看next_posts_link() 和 previous_post_link()。
This page is [[WordPress::Category:Stubs|marked]] as incomplete. You can help Codex by expanding it.
This page is [[WordPress::Category:Stubs|marked]] as incomplete. You can help Codex by expanding it.