next_posts()
最后更新于:2021-11-27 17:34:30
next_posts( int$max_page, bool$echo=true)Displays or retrieves the next posts page link.
参数
- $max_page
-
(int) (Optional) Max pages. Default 0.
- $echo
-
(bool) (Optional) Whether to echo the link.
Default value: true
响应
(string|void) The link URL for next posts page if $echo = false
.
源文件
文件: gc-includes/link-template.php
function next_posts( $max_page = 0, $echo = true ) {
$output = esc_url( get_next_posts_page_link( $max_page ) );
if ( $echo ) {
echo $output;
} else {
return $output;
}
}