wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



next_posts › WordPress Function

Depuis0.71
Dépréciéen/a
next_posts ( $max_page = 0, $display = true )
Paramètres: (2)
  • (int) $max_page Optional. Max pages. Default 0.
    Requis: Non
    Défaut:
  • (bool) $display Optional. Whether to echo the link. Default true.
    Requis: Non
    Défaut: true
Retourne:
  • (string|void) The link URL for next posts page if `$display = false`.
Défini(e) dans:
Codex:

Displays or retrieves the next posts page link.



Source

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

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