wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



next_posts › WordPress Function

Od0.71
Przestarzałyn/a
next_posts ( $max_page = 0, $display = true )
Parametry: (2)
  • (int) $max_page Optional. Max pages. Default 0.
    Wymagane: Nie
    Domyślny:
  • (bool) $display Optional. Whether to echo the link. Default true.
    Wymagane: Nie
    Domyślny: true
Powrót:
  • (string|void) The link URL for next posts page if `$display = false`.
Zdefiniowane na:
Codex:

Displays or retrieves the next posts page link.



Źródło

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;
	}
}