get_boundary_post

Sponsored Link

公開日によって、最初または最後の投稿を取得します。

Sponsored Link

Get the first or last post by publish date

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

<?php get_boundary_post( $in_same_cat, $excluded_categories, $start ); ?>

get_boundary_postのパラメーター

$in_same_cat

(boolean) (optional) 投稿が同じカテゴリ内にする必要があるどうか。
デフォルト:false

(boolean) (optional) Whether post should be in same category.
Default: false

$excluded_categories

(string) (optional) カテゴリーIDによって除外します。
Default: ”

(string) (optional) Excluded categories IDs.
Default: ”

$start

(boolean) (optional) 初めに開始する場合はtrue
デフォルトはtrue

(boolean) (optional) True to begin at the beginning
Default: true

戻り値

  • 投稿オブジェクト成功した場合。
  • グローバル$postが設定されていない場合はnullを返します。
  • 対応する投稿が存在しない場合、空の文字列。
  • Post object if successful.
  • Null if global $post is not set.
  • Empty string if no corresponding post exists.

注釈

get_boundary_post()は最初の投稿に投稿ポインタを設定します。

get_boundary_post() will set the post pointer to the first post.

変更ログ

Since: 2.8.0

ソースファイル

get_next_post()は、wp-includes/link-template.php内に位置しています。

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

Sponsored Link