This script replaces the default blog pager (links to newer, older, and home pages) with numbered page navigation, enabling readers to navigate deeper into the archives with ease, compared to the “newer” and “older” navigation links. Furthermore, it offers the ability to customize the number of page links and the number of posts displayed on each page. /*Page Navi Styles start */ 4. Next, you will need navigate over to Layout > Page Elements to “Add a Gadet”. Select HTML/JavaScript and copy and paste the following section code into the box. <!--Page Navigation Starts-->
Scroll down to view a demo
1. Login into your Blogger dashboard > Layouts > Edit HTML
2. Insert the following section code below into your template right before the section code: ]]></b:skin>
.showpageArea a {
text-decoration:underline;
}
.showpageNum a {
border:1px solid #CCCCCC;
margin:0 3px;
padding:3px 7px;
text-decoration:none;
}
.showpageNum a:hover {
background-color:#CCCCCC;
border:1px solid #CCCCCC;
}
.showpagePoint {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#CCCCCC none repeat scroll 0 0;
border:1px solid #CCCCCC;
color:#333333;
margin:0 3px;
padding:3px 7px;
text-decoration:none;
}
.showpageOf {
margin:0 3px 0 0;
padding:3px 7px;
text-decoration:none;
}
.showpage a {
border:1px solid #CCCCCC;
padding:3px 7px;
text-decoration:none;
}
.showpage a:hover {
text-decoration:none;
}
.showpageNum a:link, .showpage a:link {
color:#333333;
text-decoration:none;
}
/*Page Navi styles end*/
<script type="text/javascript">
var pageCount=5;
var displayPageNum=5;
var upPageWord ='Previous';
var downPageWord ='Next';
</script>
<script src="blogger-page-navi.v1.js" type="text/javascript"></script>
<!--Page Navigation Ends—>
Note: The above code references the external .js file "blogger-page-navi.v1.js", which you need to download (right click, and select "Save As").
Configuration
var pageCount is the number of links to display after page 1
var displayPageNum is the number of posts to be displayed on each link
var upPageWord is the previous link (you can change the wording)
var downPageWord the next link (you can change the wording)
Thursday, November 26, 2009
How to add page numbers to Blogger posts
Subscribe to:
Post Comments (Atom)
This comment has been removed by the author.
ReplyDeleteThanx for the tutorial! It's really useful!
ReplyDeleteCan you tell me where should i edit the code to change the collor of the text and borders?
PS: And how to display it ONLY on homepage?
ReplyDeleteMany many Thanks for Usefull Tips shared.I fill I am lucky.
ReplyDeletehttp://downloadbazarbd.blogspot.com
very good
ReplyDeletethanks
http://www.audiokit.co.cc
@Syed Manirul Islam @tzelal - np, nice websites btw. keep up the good work
ReplyDelete