previous_posts_link

Sponsored Link

次の記事へのリンクを作成します。はい、”前の記事”を言いますが、ちょうどあなたを混乱させる名前です。それはあなたの投稿が、タイムラインの後半から記事を表示するための前のページが原因で新しい順に表示されると仮定します。

Sponsored Link

This creates a link to the next posts. Yes, it says “previous posts,” but it’s named that just to confuse you. It assumes that your posts are displaying in reverse chronological order (most recent posts first) causing the previous page to show posts from later in the timeline.

previous_posts_linkのテンプレートタグ使用方法

<?php previous_posts_link( $label , $max_pages ); ?> 

previous_posts_linkのパラメーター

$label

(string) (optional) テキストリンクです。Defaultは’≪ Previous Page’。

(string) (optional) The link text.

Default: ‘≪ Previous Page’

$max_pages

(integer) (optional)ページ数を制限したリンクを表示します。

(integer) (optional) Limit the number of pages on which the link is displayed

Default: 0

デフォルトの使い方

<?php previous_posts_link(); ?>

作業の例

<?php previous_posts_link('≪ Newer Entries', '0') ?>

備考

参照: next_posts_link() と previous_post_link().

See also: next_posts_link() and previous_post_link().

リソース

関連テンプレートタグ

the_ID, the_title, the_title_attribute, single_post_title, the_title_rss, the_content, the_content_rss, the_excerpt, the_excerpt_rss, wp_link_pages, next_post_link, next_posts_link, previous_post_link, previous_posts_link, posts_nav_link, sticky_class, the_meta

Sponsored Link