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
查看更多 >