Page Number Widget for Blogger

Today's tutorial is about ‘How to add page number widget in Blogger’.
Page number Navigation is really an awesome feature in Blogger.
Page Number Widget for Blogger

Okay let’s start…………..
First of all…….who are bad at HTML they can easily add page number widget blogger. Just click the link and add your page navigation. :) It’s easy.




Now the complicated part for the advance users.

If you installed the widget you shouldn’t be here.. Scroll down to the label fix..

  • Login to your Blogger Dashboard.
  • Go to design>Edit HTML
  • Keep unchecked “Expand Widget Templates”
  • Now search

]]></b:skin>


and replace it with

.showpageArea a {

text-decoration:underline;

}

.showpageNum a {

text-decoration:none;

border: 1px solid #cccccc;

margin:0 3px;

padding:3px;

}

.showpageNum a:hover {

border: 1px solid #cccccc;

background-color:#cccccc;

}

.showpagePoint {

color:#333;

text-decoration:none;

border: 1px solid #cccccc;

background: #cccccc;

margin:0 3px;

padding:3px;

}

.showpageOf {

text-decoration:none;

padding:3px;

margin: 0 3px 0 0;

}

.showpage a {

text-decoration:none;

border: 1px solid #cccccc;

padding:3px;

}

.showpage a:hover {

text-decoration:none;

}

.showpageNum a:link,.showpage a:link {

text-decoration:none;

color:#333333;

}

]]></b:skin>


This is the CSS part if want you can modify it according to your need.
  • Now the java script Part now find

</body>


and replace it with

<!--Page Navigation Starts-->

<b:if cond='data:blog.pageType != &quot;item&quot;'>

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>

<script type='text/javascript'>

var pageCount=5;

var displayPageNum=5;

var upPageWord =&#39;Previous&#39;;

var downPageWord =&#39;Next&#39;;

</script>

<script src='http://blogergadgets.googlecode.com/files/blogger-page-navi.v1.js' type='text/javascript'/>

</b:if>

</b:if>

<!--Page Navigation Ends -->

</body>




As you can see,there are some customizable parameters in this code


var pageCount=5;

This code determines the number of posts that would be displayed per page.


var displayPageNum=5;

This code determines the number of additional page navigation numbers that will be displayed on the page.


var upPageWord =&#39;Previous&#39;;

var downPageWord =&#39;Next&#39;;

These two lines determine the text that would be shown for the previous page and next page respectively.


Label Fix

Now we have another problem.By default,the blogger label pages will show 20 posts.We will have to cut this down to the value that we gave for the variable pageCount (or the posts per page).For this we will have to edit our template


How to Edit the template to cut short the posts per page?

Go to the Edit HTML page and expand the Widget Templates


Now find each occurrence of


'data:label.url'

(including the quotes) and replace each of it with


'data:label.url + &quot;?&amp;max-results=5&quot;'

Here 5 is the number of posts to be displayed per page.


Now if you are using the label cloud widget by phydeaux3,then find


a.href = &#39;/search/label/&#39;+encodeURIComponent(t);

and replace it with


a.href = &#39;/search/label/&#39;+encodeURIComponent(t)+&#39;?&amp;max-results=5&#39;;



Here also 5 is the number of posts to be displayed per page.

Now you should have the Blogger Page Navigation workng perfectly on your blog. :)

Courtesy http://www.bloggerplugins.org

12 comments:

September 24, 2010 at 3:24 AM Online Health Improvement said...

Really a nice code.. moreover, appearance is quite web2.0 and can be used for a real-quality-blog as well.. keep it up guyz..

October 11, 2010 at 5:27 AM SEO Agency said...

Thanks for sharing. This code really helped me a lot for my blog. Thanks a lot.

October 18, 2010 at 12:54 AM Wordpress Development said...

I totally appreciate this post. Thank you so much for sharing this awesome codes. I was searching the entire web about page number widget for my blog.

March 21, 2011 at 4:19 AM Maryam K said...

Hi, Thanks for all of this information. I'm just starting my blog at blogspot and was wondering whether you make any money from this blog via the SEO techniques you use?

June 20, 2011 at 7:36 AM Agus said...

Thank you so much for sharing this codes.

October 6, 2011 at 3:31 AM Cost Effective SEO said...

well done! great work... really appreciates this... because it helped me.. well most of the code I found didn't work for my blog but this did...

March 21, 2012 at 2:55 AM Anonymous said...

dude, it is coming in main page but not label pages... please suggest me.

cyberfinger.blogspot.in

March 24, 2013 at 5:36 AM ahmad maryuki said...

awesome tips, the box i like it, thanks. i will try it

April 5, 2015 at 12:24 PM Unknown said...

i added on my site. and it is working...
Shihab

November 4, 2016 at 8:42 PM Unknown said...

আমার সাইটটি যোগ করবেন প্লিজ
http://AmaderTech.Com

Post a Comment