previous_posts

函式
previous_posts ( $echo = true )
引數
  • (bool) $echo Optional. Whether to echo the link. Default true.
    Required:
    Default: true
返回值
  • (string|void) The previous posts page link if `$echo = false`.
定義位置
相關方法
previous_postprevious_posts_linkget_previous_postprevious_post_linkget_previous_posts_link
引入
0.71
棄用
-

previous_posts: 這個函式檢索在同一類別或分類法中在當前文章之前發表的前一個文章的列表。

顯示或檢索以前的文章頁面連結。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function previous_posts( $echo = true ) {
$output = esc_url( get_previous_posts_page_link() );
if ( $echo ) {
echo $output;
} else {
return $output;
}
}
function previous_posts( $echo = true ) { $output = esc_url( get_previous_posts_page_link() ); if ( $echo ) { echo $output; } else { return $output; } }
function previous_posts( $echo = true ) {
	$output = esc_url( get_previous_posts_page_link() );

	if ( $echo ) {
		echo $output;
	} else {
		return $output;
	}
}

常見問題

FAQs
檢視更多 >