next_posts_link

Sponsored Link

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

Sponsored Link

This creates a link to the previous posts. Yes, it says “next 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 next page to show posts from earlier in the timeline.

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

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

next_posts_linkのパラメーター

$label

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

(string) (optional) The link text.

Default: ‘Next Page ≫’

$max_pages

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

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

Default: 0

デフォルトの使い方

<?php next_posts_link(); ?>

作業の例

<?php next_posts_link('Older Entries ≫', 0); ?>

備考

参照: previous_posts_link()next_post_link().

See also: previous_posts_link() and next_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