wpseek.com
WordPress开发者和主题制作者的搜索引擎



previous_posts › WordPress Function

Since0.71
已弃用n/a
› previous_posts ( $display = true )
参数:
  • (bool) $display Optional. Whether to echo the link. Default true.
    Required: No
    默认: true
返回:
  • (string|void) The previous posts page link when `$display` is false, or an empty
    string when there is no previous page. Nothing otherwise.
定义在:
文档:

Displays or retrieves the previous posts page link.



源码

function previous_posts( $display = true ) {
	$link   = get_previous_posts_page_link();
	$output = $link ? esc_url( $link ) : '';

	if ( ! $display ) {
		return $output;
	}

	echo $output;
}