WordPress:Template Tags/wp link pages
Description
描述
Displays page-links for paginated posts (i.e. includes the <!--nextpage-->
Quicktag one or more times). This works in much the same way as link_pages(), the difference being that arguments are given in query string format. This tag must be within WordPress:The_Loop.
为标了页数的文章显示网页链接(例如,包括<!—下一个网页-->
Quicktag一次或者更多的几次)。这与链接_网页()的运行方式基本相同,不同点在于参数是以查询字符串的形式出现的。标签必须在The_Loop内部。
Usage
用法
%%% <?php wp_link_pages('arguments'); ?> %%%
%%% <?php wp_link_pages('arguments'); ?> %%%
Examples
Default Usage
例子
默认用法
Displays page-links by default with paragraph tags before and after, using Next page and Previous page, listing them with page numbers as Page 1, Page 2 and so on.
默认显示网页链接,网页链接的前后都有段落标签,使用上一页 和下一页,并将这些网页标号为第 1页,第 2页等等。
<?php wp_link_pages(); ?>
<?php wp_link_pages(); ?>
Page-links in Paragraph Tags
段落标签中的网页链接
Displays page-links wrapped in paragraph tags.
显示由段落标签包围的网页链接。
<?php wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink=page %'); ?>
<?php wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink=page %'); ?>
Page-links in DIV
DIV中的网页链接
Displays page-links in DIV for CSS reference as <div id="page-links">.
在DIV中为CSS reference显示网页链接<div id="page-links">。
<?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?>
<?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?>
Parameters
参数
- before
- (string) Text to put before all the links. Defaults to <p>Pages:.
;之前:(string)所有的链接之前放置的文本。默认为<p>Pages:。
- after
- (string) Text to put after all the links. Defaults to </p>.
;之后:(string)所有的链接之后放置的文本。默认为</p>。
- next_or_number
- (string) Indicates whether page numbers should be used. Valid values are:
- 下一个_或者_数字
- (string)暗示是否会用到网页数字。有效的参数值是:
- number (Default)
- 数字 (默认)
- next (Valid in WordPress 1.5 or after)
- 下一个 (在 WordPress 1.5 或者以后的版本中有效)
- nextpagelink
- (string) Text for link to next page. Defaults to Next page. (Valid in WordPress 1.5 or after)
- 下一个网页链接
- (string)链接到下一个网页的文本 。默认为下一个网页。(在WordPress1.5及以后的版本中有效)
- previouspagelink
- (string) Text for link to previous page. Defaults to Previous page. (Valid in WordPress 1.5 or after)
- 上一个网页链接
- (string)上一个网页链接的文本。默认为上一个网页。(在WordPress1.5及以后的版本中有效)
- pagelink
- (string) Format string for page numbers. % in the string will be replaced with the number, so Page % would generate "Page 1", "Page 2", etc. Defaults to %.
- 网页链接
- (string)网页数字的格式字符串。字符串中的 % % 会被数字取代,因此Page %会产生"第一 1页", "第二2页",等等。默认为%。
- more_file
- (string) Page the links should point to. Defaults to the current page.
- 更多的_文件
- (string)链接指向的而网页。默认为当前网页。