older and newer post like labnol org

hello readers hope your all are fine i,m back with a new blogger trick which i think you really like and appriciate it because many people want widget like this . You ever listen the name of labnol.org it is one of the most popular blog in india which is run by amit agarwal the one of the most senior blogger . So you are thinking that why i,m talking about amit agarwal its because i,m going to teach you that how to add pagination like labnol.org the most beautiful pagination i ever seen these are some old style old and new post widget you seen on many blogs
OLD style older and newer post
but now we are change it into a new and stylish older and newer post widget in blogger wanna see the demo look at the picture below
How lovely it is looking so if you wanna older and newer post widget please follow my steps .

Steps

  • go to blogger > your blogs dashboard
  • html > edit html > proceed
  • Find  </head> ( Use CTRL+F )
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
Now paste the following code above the </head> tag and save your template
  • now go to page-elements (layout) 
  • add a gadget below post gadget 
  • select html/javascript and put the following code inside it
<style type="text/css"> #blog-pager-newer-link {font-size:85%;width:200px;text-align:left;}
#blog-pager-older-link {font-size:85%;width:200px;text-align:right;}
</style>
<script type="text/javascript">
$(document).ready(function(){
var newerLink = $("a.blog-pager-newer-link").attr("href");
$("a.blog-pager-newer-link").load(newerLink+" .post-title:first", function() {
var newerLinkTitle = $("a.blog-pager-newer-link").text();
$("a.blog-pager-newer-link").text("<< " + newerLinkTitle);
});
var olderLink = $("a.blog-pager-older-link").attr("href");
$("a.blog-pager-older-link").load(olderLink+" .post-title:first", function() {
var olderLinkTitle = $("a.blog-pager-older-link").text();
$("a.blog-pager-older-link").text(olderLinkTitle + " >>");//rgt
});
});
</script>
 then save it and  Now you will see the Post title instead of Older and newer post in your blog.

Share this

Related Posts

Previous
Next Post »