The function you’re looking for is wp_link_pages()
. Default usage below:
wp_link_pages(
array(
'before' => '<p>' . __('Pages:'),
'after' => '</p>',
'link_before' => '',
'link_after' => '',
'next_or_number' => 'number',
'nextpagelink' => __('Next page'),
'previouspagelink' => __('Previous page'),
'pagelink' => '%',
'echo' => 1
)
)
You can read the documentation here: http://codex.wordpress.org/Function_Reference/wp_link_pages