How To Add Numbered Page Navigation Widget For Blogger?

Adding page numbered navigation widget for a blogger is an awesome trick to navigate your blogger blog for your readers. With that readers can access for the old post easily.

What is Numbered Page Navigation Widget?

It allows readers to Navigate your Blogger blog post pages like a book. By using this widget your blogger blog visitors can easily go to an appropriate old post. In default blogger template does not provide any numbered navigation widget or facility. By default, it allows only Older Posts and Newer Post link. 

If readers need to visit your oldest posts then he or she needs to go back using Older post link. Sometimes it is very difficult for reader or blog owner to navigate deeper into your Blog’s oldest posts if you haven’t proper numbered navigation.

how to add numbered page navigation widget for blogger 5 lot of navigation styles
how to add numbered page navigation widget for blogger

In default blogger themes and some customized blog template do not provide that page navigation feature. Most of the time it’s a hidden feature.

Also in default, blogger provides only Older post link and Newer post link. If your blogger blog has 50 or more blog post then if your readers wanted to Access for one of the oldest blog posts he or she has to go older post via Older post link manually. But if they navigate only via Older post link, that can be a Boring thing for readers. So if your blog has a proper navigation system your readers can easily access for your older posts without any difficulties. 

Also, if you have nice page navigation, that makes a good-looking for your blog. With using Numbered navigation, you can have organized your blog properly. It makes easy access for our old blog posts. That will help our blog readers to directly access and easily jump to a specific number and navigate as per their wish.

What are the benefits of adding numbered page navigation for a blogger blog?

  • It helps visitors jump from one page to another page or click on a specific page number and access for the blog post without any difficulties. Also, it helps visitors to know the total number of the post published.
  •  Nice looking for your blog
  •  Professional look for your blog
  •  Help visitors to know exactly the total number of published post in your whole blogger blog or in a particular category.

As we discuss above blogger haven’t any built-in function on page navigate numbering, but blog owners can built-up page navigation numbering gadget using HTML and CSS knowledge. Also, this tutorial about How to add numbered page navigation for blogger blog will help you to do it easily.

How to add a numbered page navigation widget for blogger blog?

You can add numbered page navigation by following two steps.

  1. Adding the CSS code into blogger template
  2. Adding the JavaScript

Step 01

Adding the CSS code into blogger template

1.    Log into your blogger blog >> Go to Blogger Dashboard >> Go to “Template” >> Click on the Edit HTML button.

2.     Click inside the HTML code area and press CTRL for open the Blogger search box.

3.    Type and find this code ]] ></b:skin> . After you find that code Copy and paste the one of the following numbered page navigation style code what you want in your blogger blog.

Copy and paste one of below style code before or above ]]></b:skin> .

Style 01

Both Numbered Page Navigation and current tab on Gray color

#blog-pager{clear:both;margin:30px auto;text-align:center; padding: 7px;}
.blog-pager {background: none;}
.displaypageNum a,.showpage a,.pagecurrent{padding: 3px 7px;margin-right:5px;background:#E9E9E9;color: #888;border:1px solid #E9E9E9;}
.displaypageNum a:hover,.showpage a:hover,.pagecurrent{background:#CECECE;text-decoration:none;color: #000;}
#blog-pager .showpage, #blog-pager .pagecurrent{font-weight:bold;color: #888;}
#blog-pager .pages{border:none;}

Style 02

Black numbered Page Navigation with Orange Current Page

#blog-pager{clear:both;margin:30px auto;text-align:center; padding: 7px;}
.blog-pager {background: none;}
.displaypageNum a,.showpage a,.pagecurrent{padding: 5px 10px;margin-right:5px; color: #F4F4F4; background-color:#404042;-webkit-box-shadow: 0px 5px 3px -1px rgba(50, 50, 50, 0.53);-moz-box-shadow:0px 5px 3px -1px rgba(50, 50, 50, 0.53);box-shadow: 0px 5px 3px -1px rgba(50, 50, 50, 0.53);}
.displaypageNum a:hover,.showpage a:hover, .pagecurrent{background:#EC8D04;text-decoration:none;color: #fff;}
#blog-pager .showpage, #blog-pager, .pagecurrent{font-weight:bold;color: #000;}
#blog-pager .pages{border:none;-webkit-box-shadow: 0px 5px 3px -1px rgba(50, 50, 50, 0.53);-moz-box-shadow:0px 5px 3px -1px rgba(50, 50, 50, 0.53);box-shadow: 0px 5px 3px -1px rgba(50, 50, 50, 0.53);}

 Style 03

Dark Numbered Page Navigation with Blue Current Page

#blog-pager{clear:both;margin:30px auto; padding: 7px; text-align:center;font-size: 11px;background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #292929));background-image: -o-linear-gradient(top, #000000 0%, #292929 100%);background-image: -moz-linear-gradient(top, #000000 0%, #292929 100%);background-image: -webkit-linear-gradient(top, #000000 0%, #292929 100%);background-image: -ms-linear-gradient(top, #000000 0%, #292929 100%);background-image: linear-gradient(to top, #000000 0%, #292929 100%); padding: 6px;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}
.blog-pager {background: none;}
.displaypageNum a,.showpage a,.pagecurrent{padding: 3px 10px;margin-right:5px; color: #fff;}
.displaypageNum a:hover,.showpage a:hover,.pagecurrent{background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #59A2CF),color-stop(1, #D9EAFF));background-image: -o-linear-gradient(top, #59A2CF 0%, #D9EAFF 100%);background-image: -moz-linear-gradient(top, #59A2CF 0%, #D9EAFF 100%);background-image: -webkit-linear-gradient(top, #59A2CF 0%, #D9EAFF 100%);background-image: -ms-linear-gradient(top, #59A2CF 0%, #D9EAFF 100%);background-image: linear-gradient(to top, #59A2CF 0%, #D9EAFF 100%);text-decoration: none;color: #000;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}
.showpageOf{display:none!important}.blog-pager-older-link, .home-link, .blog-pager-newer-link {background: transparent;}, a.home-link, {color: #fff;}
#blog-pager .pages{border:none;background: none;}

Style 04

Page Numbered Navigation with Gray color and Blue Current page tab.

#blog-pager{clear:both;margin:30px auto;text-align:center; padding: 7px;}
.blog-pager {background: none;}
.displaypageNum a,.showpage a,.pagecurrent{font-size: 14px;padding: 5px 12px;margin-right:5px; color: #666; background-color:#eee;}
.displaypageNum a:hover,.showpage a:hover, .pagecurrent{background:#359BED;text-decoration:none;color: #fff;}
#blog-pager .pagecurrent{font-weight:bold;color: #fff;background:#359BED;}
#blog-pager .pages{border:none;}

Style 05

Page number navigation on Green color with Orange and Pink current page tab

#blog-pager{clear:both;margin:30px auto;text-align:center; padding: 7px; }
.blog-pager {background: none;}
.displaypageNum a,.showpage a,.pagecurrent{font-size: 13px;padding: 5px 12px;margin-right:5px; color: #3E5801; background-color:#E0EDC1;}
.displaypageNum a:hover,.showpage a:hover, .pagecurrent{background:#FEF6DF;text-decoration:none;color: #E16800;}
#blog-pager .pagecurrent{font-weight:bold;color: #D25E71;background:#FFDEDF;}
#blog-pager .pages{border:none;}

Style 06

Page number navigation on an Orange color with Red color current page

#blog-pager{clear:both;margin:30px auto;text-align:center; padding: 7px; }
.blog-pager {background: none;}
.displaypageNum a,.showpage a,.pagecurrent{font-size: 13px;padding: 5px 12px;margin-right:5px; color: #AD0B00; background-color:#FAB001;}
.displaypageNum a:hover,.showpage a:hover, .pagecurrent{background:#DB4920;text-decoration:none;color: #fff;}
#blog-pager .pagecurrent{font-weight:bold;color: #fff;background:#DB4920;}
#blog-pager .pages{border:none;}

Style 07

Page number navigation on a Gray color with Red color current page

Note:  If you want to hide them “First” and “Last” buttons, then add the following CSS code too.

.firstpage, .lastpage {display: none;}

*Working for more than 500 posts

Step 02.

Adding the JavaScript

4. Now again press Ctrl + F and type </body> and click ENTER

5. Then add the below JavaScript just above </body> tag.

<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<script type='text/javascript'>
        var perPage=3;
        var numPages=3;
        var firstText ='First';
        var lastText ='Last';
        var prevText ='« Previous';
        var nextText ='Next »';
        var urlactivepage=location.href;
        var home_page="/";

if(typeof firstText=="undefined")firstText="First";if(typeof lastText=="undefined")lastText="Last";var noPage;var currentPage;var currentPageNo;var postLabel;pagecurrentg();function looppagecurrentg(pageInfo){var html='';pageNumber=parseInt(numPages / 2);if(pageNumber==numPages-pageNumber){numPages=pageNumber*2+1}

pageStart=currentPageNo-pageNumber;if(pageStart<1)pageStart=1;lastPageNo=parseInt(pageInfo / perPage)+1;if(lastPageNo-1==pageInfo / perPage)lastPageNo=lastPageNo-1;pageEnd=pageStart+numPages-1;if(pageEnd>lastPageNo)pageEnd=lastPageNo;html+="<span class='showpageOf'>Page "+currentPageNo+' of '+lastPageNo+"</span>";var prevNumber=parseInt(currentPageNo)-1;if(currentPageNo>1){if(currentPage=="page"){html+='<span class="showpage firstpage"><a href="'+home_page+'">'+firstText+'</a></span>'}else{html+='<span class="displaypageNum firstpage"><a href="/search/label/'+postLabel+'?&max-results='+perPage+'">'+firstText+'</a></span>'}}

if(currentPageNo>2){if(currentPageNo==3){if(currentPage=="page"){html+='<span class="showpage"><a href="'+home_page+'">'+prevText+'</a></span>'}else{html+='<span class="displaypageNum"><a href="/search/label/'+postLabel+'?&max-results='+perPage+'">'+prevText+'</a></span>'}}else{if(currentPage=="page"){html+='<span class="displaypageNum"><a href="#" onclick="redirectpage('+prevNumber+');return false">'+prevText+'</a></span>'}else{html+='<span class="displaypageNum"><a href="#" onclick="redirectlabel('+prevNumber+');return false">'+prevText+'</a></span>'}}}

if(pageStart>1){if(currentPage=="page"){html+='<span class="displaypageNum"><a href="'+home_page+'">1</a></span>'}else{html+='<span class="displaypageNum"><a href="/search/label/'+postLabel+'?&max-results='+perPage+'">1</a></span>'}}

if(pageStart>2){html+=' ... '}

for(var jj=pageStart;jj<=pageEnd;jj++){if(currentPageNo==jj){html+='<span class="pagecurrent">'+jj+'</span>'}else if(jj==1){if(currentPage=="page"){html+='<span class="displaypageNum"><a href="'+home_page+'">1</a></span>'}else{html+='<span class="displaypageNum"><a href="/search/label/'+postLabel+'?&max-results='+perPage+'">1</a></span>'}}else{if(currentPage=="page"){html+='<span class="displaypageNum"><a href="#" onclick="redirectpage('+jj+');return false">'+jj+'</a></span>'}else{html+='<span class="displaypageNum"><a href="#" onclick="redirectlabel('+jj+');return false">'+jj+'</a></span>'}}}


if(pageEnd<lastPageNo){if(currentPage=="page"){html+='<span class="displaypageNum"><a href="#" onclick="redirectpage('+lastPageNo+');return false">'+lastPageNo+'</a></span>'}else{html+='<span class="displaypageNum"><a href="#" onclick="redirectlabel('+lastPageNo+');return false">'+lastPageNo+'</a></span>'}}

var nextnumber=parseInt(currentPageNo)+1;if(currentPageNo<(lastPageNo-1)){if(currentPage=="page"){html+='<span class="displaypageNum"><a href="#" onclick="redirectpage('+nextnumber+');return false">'+nextText+'</a></span>'}else{html+='<span class="displaypageNum"><a href="#" onclick="redirectlabel('+nextnumber+');return false">'+nextText+'</a></span>'}}

if(currentPageNo<lastPageNo){if(currentPage=="page"){html+='<span class="displaypageNum lastpage"><a href="#" onclick="redirectpage('+lastPageNo+');return false">'+lastText+'</a></span>'}else{html+='<span class="displaypageNum lastpage"><a href="#" onclick="redirectlabel('+lastPageNo+');return false">'+lastText+'</a></span>'}}

var pageArea=document.getElementsByName("pageArea");var blogPager=document.getElementById("blog-pager");for(var p=0;p<pageArea.length;p++){pageArea[p].innerHTML=html}



function totalcountdata(root){var feed=root.feed;var totaldata=parseInt(feed.openSearch$totalResults.$t,10);looppagecurrentg(totaldata)}

function pagecurrentg(){var thisUrl=urlactivepage;if(thisUrl.indexOf("/search/label/")!=-1){if(thisUrl.indexOf("?updated-max")!=-1){postLabel=thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?updated-max"))}else{postLabel=thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?&max"))}}


document.write("<script src=\""+home_page+"feeds/posts/summary?max-results=1&alt=json-in-script&callback=totalcountdata\"><\/script>")}else{currentPage="label";if(thisUrl.indexOf("&max-results=")==-1){perPage=20}


document.write('<script src="'+home_page+'feeds/posts/summary/-/'+postLabel+'?alt=json-in-script&callback=totalcountdata&max-results=1" ><\/script>')}}}

function redirectpage(numberpage){jsonstart=(numberpage-1)*perPage;noPage=numberpage;var nameBody=document.getElementsByTagName('head')[0];var newInclude=document.createElement('script');newInclude.type='text/javascript';newInclude.setAttribute("src",home_page+"feeds/posts/summary?start-index="+jsonstart+"&max-results=1&alt=json-in-script&callback=finddatepost");nameBody.appendChild(newInclude)}

function redirectlabel(numberpage){jsonstart=(numberpage-1)*perPage;noPage=numberpage;var nameBody=document.getElementsByTagName('head')[0];var newInclude=document.createElement('script');newInclude.type='text/javascript';newInclude.setAttribute("src",home_page+"feeds/posts/summary/-/"+postLabel+"?start-index="+jsonstart+"&max-results=1&alt=json-in-script&callback=finddatepost");nameBody.appendChild(newInclude)}

function finddatepost(root){post=root.feed.entry[0];var timestamp1=post.published.$t.substring(0,19)+post.published.$t.substring(23,29);var timestamp=encodeURIComponent(timestamp1);if(currentPage=="page"){var pAddress="/search?updated-max="+timestamp+"&max-results="+perPage+"#PageNo="+noPage}else{var pAddress="/search/label/"+postLabel+"?updated-max="+timestamp+"&max-results="+perPage+"#PageNo="+noPage}




Now click on the Save template button, but if you want to do some changes into your numbered page navigation follow the below guidelines.

    perPage: 7,

    numPages: 6,

    var firstText =’First’;

    var lastText =’Last’;

    var prevText =’« Previous’;

    var nextText =’Next »’;


1. perPage: In here you can customize How many posts will be shown on each page. ( 7 ) This value has to be the same as the number of posts that display in the home/main page. Otherwise, you can customize it as below,

In the blogger blog, it provides the option to set the number of posts that you want to display per page. You go to thereby, Dashboard >> Settings >> Post and Comments >> Show at most #posts >> save button.

2. numpages: From here you can customize how many pages will be shown in the page navigation. ( 6 )

3.  var firstText,  var lastText, var prevText, var nextText:  from here you can customize the words that will show up to your visitors for navigation, like, First, Last, Previous and Next

4. Labels fix, – By default, the blogger will show up 20 of your blog post on the label page. To make this widget appear on label pages, you have to just cut down the value in the perPage variable.

Find each occurrence of the following code:


Replace it with this one below:

expr:href='data:label.url + "?&max-results=7"' 

Here 7 is the number of posts that will be displayed per page.

*After you did the customization, click the Save Template button.

I hope the above methods help you to add a numbered page navigation widget for blogger blog. And if you have any problem or know more on this How To Add Numbered Page Navigation Widget For Blogger?, Please share with us in the comments section below.

Happy blogging!

Follow me

Keshan Liyanagamage

Blogger at Takitakibiz
Hi! I'm Keshan Liyanagamage. A blogger. is created to provide free guides and tips to help online Entrepreneurs in enhancing and simplifying their Online/Offline Business, Blogging, and SEO knowledge. Takitakibiz was founded in Feb. 2018

I believe that knowledge should be free. So please, gain more knowledge through TakitakiBiz to Become Your Own Boss.
Keshan Liyanagamage
Follow me
Share This & Spread the Knowledge

Leave a Reply

Your email address will not be published. Required fields are marked *

5 × two =