Displays or retrieves the previous posts page link.
$displaybooloptional
Default:true
$display = false.function previous_posts( $display = true ) {
$output = esc_url( get_previous_posts_page_link() );
if ( $display ) {
echo $output;
} else {
return $output;
}
}
| Version | Description |
|---|---|
| 0.71 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/previous_posts