How To Show Next and Previous Post Below Comment Box
If you notice, you can see my previous and next post just below the comment box. I’ve used it to decrease the bounce rate and keep my readers on my blog for a longer time. Have a look :
In todays article I am going to tell you, how to display these previous and next post, at the bottom, below comment box. Lets start :
1. Always remember that when we open any article, that page is the single.php file. In this tutorial also, we have to make changes in this file only.
2. In your theme, open single.php file and search for the following code.
<?php comments_template(); ?>
3. Now, enter the following code, just below it.
<div class=”nextprv”>
<div class=”alignleft”><?php previous_post_link(‘« %link’) ?></div>
<div class=”alignright”><?php next_post_link(‘%link »’) ?></div></div>
4. Now, save your work and you’re done.
5. Now, open any post and you will see previous post in the left hand side and next post in the right hand side. To make these posts look more attractive we’ll change the size of the fonts. What we will do is, we will create a new class in style.css file.
6. Open style.css file and paste the following code at the last.
.nextprv {
font-size: 14px;
margin: 20px 5px 0px 5px;
padding: 2px 5px 17px 5px;
border-top: 1px solid #CFE4F2;
}
Note : If you want to increase or decrease the font size, change the font-size attribute from 14 to any number you want. As the number increases, the size increases and vice-versa.
7. And finally, you are done !
Troubleshooting
If you are facing any kind of problem, kindly download the code from here.
Related Posts via Categories
- Adsense Earnings based on Buying Keywords
- 20+ Codes and Hacks Every WordPress User Should Know
- Use Google Related Links To Display Related Articles In Your Blog
- How To Add Gravatar Beside Post Title In Blogger : Tutorial
- How to Create Author.php Page For Your WordPress Blog
- Understanding Different Types Of Hosting
- Moving to Custom Domain in Blogger
- Wblogger The Best Offline Blogging Client
- Welcome To HTML Tutorials : Introduction : Lesson 1
- Mashable Violating Google Adsense Rules By Encouraging Accidental Clicks : Post Updated


A simple and yet easy customization to add to ones theme. It also helps the users see that there was a previous or next post.
Thanks for sharing the post. I am in need of this code.
hey buddy i have seen ppl using in blogspot as well….. do u know how to do it in blogger ??
sure, i’ll write a tutorial on it soon.
nice trick…
how to do it in blogger ??
This will help to work with my blog..Thanx guys..