retlehs/roots — Issue #318: Improved Pagination
Author: zslabs
Created: 2012-03-01 20:18:34+00:00
State: open

Hey Ben,

The default post navigation uses the standard, boring _Older Posts_ or _Newer Posts_

max_num_pages > 1) { ?>

Referencing http://wp.tutsplus.com/tutorials/wordpress-pagination-a-primer/ I think a much more usable alternative would be the following:

max_num_pages;
if ($total_pages > 1){
$current_page = max(1, get_query_var('paged'));
echo '

';
echo paginate_links(array(
'base' => get_pagenum_link(1) . '%_%',
'format' => 'page/%#%',
'current' => $current_page,
'total' => $total_pages,
'prev_text' => 'Prev',
'next_text' => 'Next'
));
echo '

';
}
?>

As it states in the article, this will put both _Prev_, _Next_ and page numbers as well.

I know I keep throwing these code changes at you - I'll sit down and learn how to properly do these through GitHub soon :)