wp_link_pages – WordPress*リファレンス

paginatedポスト(すなわち、1回以上<!–nextpage–>Quicktagを含んでいる)のためにページリンクを表示します。 違いが質問記号列の書式で議論を与えるということであり、これは大体同じようなやり方でlink_pages()として働いています。 _Loopの中にこのタグはあるに違いありません。

原文(翻訳元): ⇒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 The_Loop.

タグ使用方法

<?php wp_link_pages('arguments'); ?>

Default Usage

2ページなどのページ番号をもっている彼らについて1ページに記載して、NextページとPreviousページを使用して、前後にデフォルトでパラグラフタグでページリンクを表示します。

原文(翻訳元): ⇒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.

<?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 %'); ?>

Page-links in DIV

CSS参照のために
<div id=”page-links”>
としてDIVにページリンクを表示します。

原文(翻訳元): ⇒Displays page-links in DIV for CSS reference as <div id=”page-links”>.

<?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:.

after

原文(翻訳元): ⇒(string) Text to put after all the links. Defaults to </p>.

next_or_number

原文(翻訳元): ⇒(string) Indicates whether page numbers should be used. Valid values are:

  • number (Default)
  • next (Valid in WordPress 1.5 or after)

nextpagelink

原文(翻訳元): ⇒(string) Text for link to next page. Defaults to Next page. (Valid in WordPress 1.5 or after)

previouspagelink

原文(翻訳元): ⇒(string) Text for link to previous page. Defaults to Previous page. (Valid in WordPress 1.5 or after)

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 %.

more_file

原文(翻訳元): ⇒(string) Page the links should point to. Defaults to the current page.

使用例

関連テンプレートタグ

edit_post_link, edit_comment_link,link_pages, wp_link_pages, get_year_link, get_month_link, get_day_link


HOME » テンプレートタグ » リンクタグ » wp_link_pages – WordPress*リファレンス