WordPress: Getting “Newer Posts” and “Older Posts” links on a Specialized Page Template

You can achieve this using WP_Query as shown in the following code. To know more information on this visit this page.

<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$the_query = new WP_Query( 'posts_per_page=5&paged=' . $paged ); 


if ( $the_query->have_posts() ) :

    // the loop
    while ( $the_query->have_posts() ) : $the_query->the_post(); 
        the_title();
    endwhile; 

next_posts_link( 'Older Entries', $the_query->max_num_pages );
previous_posts_link( 'Newer Entries' );

// clean up after our query
wp_reset_postdata();
endif;  ?>