wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



next_posts › WordPress Function

Desde0.71
Obsoleton/a
› next_posts ( $max_page = 0, $display = true )
Parâmetros: (2)
  • (int) $max_page Optional. Max pages. Default 0.
    Required: No
    Padrão: —
  • (bool) $display Optional. Whether to echo the link. Default true.
    Required: No
    Padrão: true
Retorna:
  • (string|void) The next posts page link when `$display` is false, or an empty
    string when there is no next page. Nothing otherwise.
Definido em:
Codex:

Displays or retrieves the next posts page link.



Fonte

function next_posts( $max_page = 0, $display = true ) {
	$link   = get_next_posts_page_link( $max_page );
	$output = $link ? esc_url( $link ) : '';

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

	echo $output;
}