get_next_posts_link

Sponsored Link

現在のページの記事のセットへのリンクを返します。

Sponsored Link

Return a link to the set of posts of the current page.

get_next_posts_linkのファンクションタグ使用方法

<?php echo get_next_posts_link( $label, $max_page ); ?>

get_next_posts_linkのパラメーター

$label

(string) (optional)リンクテキストの内容
デフォルト:Next Page »

(string) (optional) The content for the link text
Default: Next Page »

$max_page

(int) (optional)記事を分割するページの最大数。
デフォルト:0

(int) (optional) The max number of pages to split the posts into.
Default: 0

戻り値

成功すれば、次のページをリンクします。それ以外の場合はnullを返します。

Link to next page if successful, otherwise null.

デフォルトの使用方法

<?php echo get_next_posts_link(); ?>

カスタムラベル

<?php echo get_next_posts_link('Go to next page'); ?>

カスタムラベルと記事ページのカスタム数

<?php echo get_next_posts_link('Go to next page',4); ?>

変更ログ

Since 2.7.0

ソースファイル

get_next_posts_link()は、link-template.php内に位置しています。

get_next_posts_link() is located in wp-includes/link-template.php.

関連ファンクションタグ

Pagination: posts_nav_link(), next_posts_link(), previous_posts_link(), get_next_posts_link(), get_previous_posts_link(), paginate_links() wp_link_pages(), next_post_link(), previous_post_link(), next_image_link(), previous_image_link(),

Sponsored Link