Sponsored Link
現在の投稿に隣接する次のエントリーを取得します。
Sponsored Link
Retrieve next post that is adjacent to current post.
get_next_postのファンクションタグ使用方法
<?php get_next_post( $in_same_cat, $excluded_categories ) ?>
get_next_postのパラメーター
$in_same_cat
(boolean) (optional)投稿は同じカテゴリ内にする必要があるどうか。
Default: false
(boolean) (optional) Whether post should be in same category.
Default: false
$excluded_categories
(string) (optional) カテゴリーIDを除外します。
Default: ”
(string) (optional) Excluded categories IDs.
Default: ”
戻り値
- 投稿オブジェクト成功した場合。
- グローバル$postが設定されていない場合はnullを返します。
- 対応する投稿が存在しない場合、空の文字列。
- Post object if successful.
- Null if global $post is not set.
- Empty string if no corresponding post exists.
注釈
Uses: get_adjacent_post()
変更ログ
Since: 1.5.0
ソースファイル
get_next_post()は、wp-includes/link-template.php内に位置しています。
get_next_post() is located in wp-includes/link-template.php.