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



get_previous_posts_page_link › WordPress Function

Od2.0.10
Przestarzałyn/a
get_previous_posts_page_link ( Brak parametrów )
Powrót:
  • (string|void) The link for the previous posts page.
Zdefiniowane na:
Codex:

Retrieves the previous posts page link.

Will only return string, if not on a single page or post. Backported to 2.0.10 from 2.1.3.


Źródło

function get_previous_posts_page_link() {
	global $paged;

	if ( ! is_single() ) {
		$previous_page = (int) $paged - 1;

		if ( $previous_page < 1 ) {
			$previous_page = 1;
		}

		return get_pagenum_link( $previous_page );
	}
}