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 next posts page link when `$display` is false, or an empty
    string when there is no next page. Nothing otherwise.
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 ) {
		return $output;
	}

	echo $output;
}