previous_posts()
Displays or retrieves the previous posts page link.
No Hooks.
Return
String|null
. The previous posts page link if $display = false.
Usage
previous_posts( $display );
- $display(true|false)
- Whether to echo the link.
Default: true
Changelog
Since 0.71 | Introduced. |
previous_posts() previous posts code WP 6.6.2
function previous_posts( $display = true ) { $output = esc_url( get_previous_posts_page_link() ); if ( $display ) { echo $output; } else { return $output; } }