Blogger Widgets Blogger Widgets

Thursday, May 16, 2013

Numbered Page Navigation for Blogger


Numbered Page Navigation for Blogger

Page Navigation  facilitates visitors to explore our blog and view  page per page. Blogger did not facilitate page navigation. Page Navigation is a really awesome and long awaited feature.  Himanchal Sharma has perfected it and he has now given us the perfect page navigation solution.

For WordPress users must already be familiar with page navigation. For Blogger users let's We hack the template.

Here are the steps:

1.Login to Blogger Dashboard and navigate to Layout > Edit Html

2.Don’t click the checkbox which says ‘Expand Widget Templates’

3.Now find 
]]></b:skin>

and replace with
/* Page Navigation styles */
.showpageNum a {
  padding: 3px 8px;
  margin:0 4px;
  text-decoration: none;
  border:1px solid #999;
  -webkit-border-radius:3px;-moz-border-radius:3px;
  background: #ddd;
  }

.showpageOf {
margin:0 8px 0 0;
}
.showpageNum a:hover {
  border:1px solid #888;
  background: #ccc;
  }

.showpagePoint {
  color:#fff;
  text-shadow:0 1px 2px #333;
  padding: 3px 8px;
  margin: 2px;
  font-weight: 700;
  -webkit-border-radius:3px;-moz-border-radius:3px;
  border:1px solid #999;
  background: #666;
  text-decoration: none;
  }
]]></b:skin>

4. Now find 
</body>
and replace with
<!--Page Navigation Starts-->
<script type='text/javascript'>
var home_page=&quot;/&quot;;
var urlactivepage=location.href;
var postperpage=4;
var numshowpage=6;
var upPageWord =&#39;Previous&#39;;
var downPageWord =&#39;Next&#39;;
</script>
<script src='http://bloggerhack.googlecode.com/files/pagenav.js' type='text/javascript'/>
<!--Page Navigation Ends -->
</body>
There are some customizable parameters in this code
varpostperpage=4;
This code determines the number of posts that would be displayed per page.
varnumshowpage=6;
This code determines the number of additional page navigation numbers that will be displayed on the page.
var upPageWord =&#39;Previous&#39;;
downPageWord =&#39;Next&#39;;
These two lines determine the text that would be shown for the previous pageand next page respectively.
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© 2011 Bgamerzzz
Template Designed by Blog Thiet Ke
Posts RSSComments RSS
Back to top

Privacy Policy