previous_posts( bool $display = true ): string|void

Displays or retrieves the previous posts page link.


Parameters

$display bool Optional
Whether to echo the link.

Default: true


Top ↑

Return

string|void The previous posts page link if $display = false.


Top ↑

Source

File: wp-includes/link-template.php. View all references

function previous_posts( $display = true ) {
	$output = esc_url( get_previous_posts_page_link() );

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


Top ↑

Changelog

Changelog
Version Description
0.71 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.