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



previous_posts › WordPress Function

Depuis0.71
Dépréciéen/a
› previous_posts ( $display = true )
Paramètres:
  • (bool) $display Optional. Whether to echo the link. Default true.
    Requis: Non
    Défaut: true
Retourne:
  • (string|void) The previous posts page link when `$display` is false, or an empty
    string when there is no previous page. Nothing otherwise.
Défini(e) dans:
Codex:

Displays or retrieves the previous posts page link.



Source

function previous_posts( $display = true ) {
	$link   = get_previous_posts_page_link();
	$output = $link ? esc_url( $link ) : '';

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

	echo $output;
}