Adding previous/next post links
To add the previous / next post links to your single post page, you have to open the single.php file and insert the following code:
echo '<div class="alignleft">'; previous_post_link('%link', 'Previous post', false); echo '</div><div class="alignright">'; next_post_link('%link', 'Next post', false); echo '</div><div class="clear"></div>';
just after the line that includes the post template file. In our latest themes, this line should look like this:
locate_template( array( 'includes/post-template.php'), true, false );
and for older themes, this line should be like this:
include(TEMPLATEPATH . '/includes/single-blog.php');
For more information about the previous_post_link function, you can refer to its reference on the WordPress site:
http://codex.wordpress.org/Function_Reference/previous_post_link
For more information about the next_post_link function, you can refer to its reference on the WordPress site:
http://codex.wordpress.org/Function_Reference/next_post_link