Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_previous_posts_page_link [ WordPress Function ]

get_previous_posts_page_link ( No parameters )
Returns:
  • (string|null)
Defined at:



Retrieve 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.

Source


<?php
function get_previous_posts_page_link() {
    global 
$paged;

    if ( !
is_single() ) {
        
$nextpage intval($paged) - 1;
        if ( 
$nextpage )
            
$nextpage 1;
        return 
get_pagenum_link($nextpage);
    }
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

User discussions [ wordpress.org ]

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics