Using the native pagination function in wordpress
For long time I used some plugins like wp-pagenavi to make pagination for WordPress b/c I just knew that function that display “older posts” and “Newer posts” wich is not very interative and I never like it.
Browsing by the Codex I found a very simple,easy and short function that I make me feel like a stupid b/c I used a plugin to make it.
You can see the function below:
<?php wp_link_pages( $args ); ?>
Easy uh?! The parameters is also very easy to understand and change.
See below the parameters default:
<?php $args = array(
'before' => '<p>' . __('Pages:'),
'after' => '</p>',
'link_before' => , 'link_after' => ,
'next_or_number' => 'number',
'nextpagelink' => __('Next page'),
'previouspagelink' => __('Previous page'),
'pagelink' => '%',
'more_file' => , 'echo' => 1 ); ?>
