How To Add Next & Previous Numbered in your Blog/Blogger
While setting up a new blog, the
headache bloggers face that is choosing the right theme for their blog. The right theme contains several important features with the theme. An easy user
interface is one of the most important features that every blogger wants in
their blogs. Actually it help's the users to browse the blog more easily. The user interface theme structure with many things comes such as a proper menu with drop-down and sub-items, some widgets, tag links, that point to special content, and
next previous pagination buttons also comes. If your blog theme contains the worst
pagination buttons or you wanna implement some new buttons then in this post,
we're gonna share some next & previous numbered pagination buttons for
bloggers.
Next & Previous Numbered Pagination for Blogger
So, you're interested in this
pagination and let me tell you more about this pagination here. Its design
seems to be Flat UI; it is the most beautiful user interface and also trending
these days. It's purely made with JavaScript and CSS. JavaScript makes the
functions work while CSS is only used for its design. It also has a numbering
system and other than this it has two next and previous buttons. We've prepared
its 4 flat colors and you should choose the most appropriate and suitable color
for your theme. These pagination buttons appear at the bottom of all posts on the homepage only. They get their position automatically, actually, they will get
replaced with default next and previous buttons.
Tutorial to Add Next &
Previous Pagination Buttons Blog
We're dividing the tutorial into
two parts so that it may become easy for you to understand and proceed with the
tutorial. The first is about installing pagination functions and the second is
about giving a look or design to it. Let's do it now.
1. Installing Pagination's Functions
Go To Blogger >> Template
>> Back Your Template
Click Edit HTML >> Search
For </body>
Now Paste the Following Code
Above </body>
<b:if cond='data:blog.pageType
!= "item"'>
<b:if cond='data:blog.pageType
!= "static_page"'>
<script
type='text/javascript'>
/*<![CDATA[*/
var postperpage=5;
var numshowpage=2;
var upPageWord ='« Previous Page';
var downPageWord ='Next Page »';
var urlactivepage=location.href;
var home_page="/";
/*]]>*/
</script>
<script
type='text/javascript'>
/*<![CDATA[*/
var nopage;var jenis;var nomerhal;var
lblname1;halamanblogger();function loophalaman(banyakdata){var html='';nomerkiri=parseInt(numshowpage/2);if(nomerkiri==numshowpage-nomerkiri){numshowpage=nomerkiri*2+1}mulai=nomerhal-nomerkiri;if(mulai<1)mulai=1;maksimal=parseInt(banyakdata/postperpage)+1;if(maksimal-1==banyakdata/postperpage)maksimal=maksimal-1;akhir=mulai+numshowpage-1;if(akhir>maksimal)akhir=maksimal;html+="<span
class='showpageOf'>Page "+nomerhal+' of
'+maksimal+"</span>";var
prevnomer=parseInt(nomerhal)-1;if(nomerhal>1){if(nomerhal==2){if(jenis=="page"){html+='<span
class="showpage"><a href="'+home_page+'">'+upPageWord+'</a></span>'}else{html+='<span
class="showpageNum"><a
href="/search/label/'+lblname1+'?&max-results='+postperpage+'">'+upPageWord+'</a></span>'}}else{if(jenis=="page"){html+='<span
class="showpageNum"><a href="#"
onclick="redirectpage('+prevnomer+');return
false">'+upPageWord+'</a></span>'}else{html+='<span
class="showpageNum"><a href="#"
onclick="redirectlabel('+prevnomer+');return
false">'+upPageWord+'</a></span>'}}}if(mulai>1){if(jenis=="page"){html+='<span
class="showpageNum"><a href="'+home_page+'">1</a></span>'}else{html+='<span
class="showpageNum"><a
href="/search/label/'+lblname1+'?&max-results='+postperpage+'">1</a></span>'}}if(mulai>2){html+='
... '}for(var jj=mulai;jj<=akhir;jj++){if(nomerhal==jj){html+='<span
class="showpagePoint">'+jj+'</span>'}else
if(jj==1){if(jenis=="page"){html+='<span
class="showpageNum"><a
href="'+home_page+'">1</a></span>'}else{html+='<span
class="showpageNum"><a href="/search/label/'+lblname1+'?&max-results='+postperpage+'">1</a></span>'}}else{if(jenis=="page"){html+='<span
class="showpageNum"><a href="#"
onclick="redirectpage('+jj+');return
false">'+jj+'</a></span>'}else{html+='<span
class="showpageNum"><a href="#"
onclick="redirectlabel('+jj+');return
false">'+jj+'</a></span>'}}}if(akhir<maksimal-1){html+='...'}if(akhir<maksimal){if(jenis=="page"){html+='<span
class="showpageNum"><a href="#"
onclick="redirectpage('+maksimal+');return
false">'+maksimal+'</a></span>'}else{html+='<span class="showpageNum"><a
href="#" onclick="redirectlabel('+maksimal+');return
false">'+maksimal+'</a></span>'}}var
nextnomer=parseInt(nomerhal)+1;if(nomerhal<maksimal){if(jenis=="page"){html+='<span
class="showpageNum"><a href="#"
onclick="redirectpage('+nextnomer+');return
false">'+downPageWord+'</a></span>'}else{html+='<span class="showpageNum"><a
href="#" onclick="redirectlabel('+nextnomer+');return
false">'+downPageWord+'</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}if(pageArea&&pageArea.length>0){html=''}if(blogPager){blogPager.innerHTML=html}}function
hitungtotaldata(root){var feed=root.feed;var
totaldata=parseInt(feed.openSearch$totalResults.$t,10);loophalaman(totaldata)}function
halamanblogger(){var
thisUrl=urlactivepage;if(thisUrl.indexOf("/search/label/")!=-1){if(thisUrl.indexOf("?updated-max")!=-1){lblname1=thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?updated-max"))}else{lblname1=thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?&max"))}}if(thisUrl.indexOf("?q=")==-1&&thisUrl.indexOf(".html")==-1){if(thisUrl.indexOf("/search/label/")==-1){jenis="page";if(urlactivepage.indexOf("#PageNo=")!=-1){nomerhal=urlactivepage.substring(urlactivepage.indexOf("#PageNo=")+8,urlactivepage.length)}else{nomerhal=1}document.write("<script
src=\""+home_page+"feeds/posts/summary?max-results=1&alt=json-in-script&callback=hitungtotaldata\"><\/script>")}else{jenis="label";if(thisUrl.indexOf("&max-results=")==-1){postperpage=20}if(urlactivepage.indexOf("#PageNo=")!=-1){nomerhal=urlactivepage.substring(urlactivepage.indexOf("#PageNo=")+8,urlactivepage.length)}else{nomerhal=1}document.write('<script
src="'+home_page+'feeds/posts/summary/-/'+lblname1+'?alt=json-in-script&callback=hitungtotaldata&max-results=1"
><\/script>')}}}function
redirectpage(numberpage){jsonstart=(numberpage-1)*postperpage;nopage=numberpage;var
nBody=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");nBody.appendChild(newInclude)}function
redirectlabel(numberpage){jsonstart=(numberpage-1)*postperpage;nopage=numberpage;var
nBody=document.getElementsByTagName('head')[0];var
newInclude=document.createElement('script');newInclude.type='text/javascript';newInclude.setAttribute("src",home_page+"feeds/posts/summary/-/"+lblname1+"?start-index="+jsonstart+"&max-results=1&alt=json-in-script&callback=finddatepost");nBody.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(jenis=="page"){var
alamat="/search?updated-max="+timestamp+"&max-results="+postperpage+"#PageNo="+nopage}else{var
alamat="/search/label/"+lblname1+"?updated-max="+timestamp+"&max-results="+postperpage+"#PageNo="+nopage}location.href=alamat}
/*]]>*/
</script>
</b:if>
</b:if>
Click Save Template
You're Done First Part.
Let's Jump to Another Part
2. Installing Suitable Pagination Design
We've 4 colors of this pagination
and you should install the suitable color with your theme.
Below coding box contains codes
of all colors and they're separated with highlighted headings so be clever in
choosing the right code and copy code below any highlighted heading.
Go To Blogger >> Template
>> Edit HTML
Search For ]]></b:skin>
Above ]]></b:skin> Paste
The Code Of Any Pagination Skin.
//* Red Style 1 ---------------------------------------- *//
#blog-pager{float:left;font-size:16px;line-height:normal;margin:0
20px;padding:2em 0}
.showpageNum a,.showpage
a,.showpagePoint{background:#e74c3c;border:none;border-bottom:3px solid
#862B20;color:#FFF;font-size:15px;font-family:open
sans;font-weight:700;margin-left:10px;border-radius:5px 5px 5px
5px;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px;-o-border-radius:5px
5px 5px 5px;transition:background 400ms;-webkit-transition:background
400ms;-moz-transition:background 400ms;-o-transition:background
400ms;padding:10px 20px}
.showpageNum a:hover,.showpage
a:hover,.showpagePoint,.blog-pager-newer-link,.blog-pager-older-link,.home-link{background:#c0392b;color:#FFF}
.showpageOf{display:none!important}
@font-face{font-family:'font-style:normal;font-weight:700;src:local('OpenSansBold'),
local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff)
format('woff')}
//* Blue Style 2 --------------------------------------------------- *//
#blog-pager{float:left;font-size:16px;line-height:normal;margin:0
20px;padding:2em 0}
.showpageNum a,.showpage
a,.showpagePoint{background:#3498db;border:none;border-bottom:3px solid
#246EA0;color:#FFF;font-size:15px;font-family:open
sans;font-weight:700;margin-left:10px;border-radius:5px 5px 5px
5px;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px;-o-border-radius:5px
5px 5px 5px;transition:background 400ms;-webkit-transition:background
400ms;-moz-transition:background 400ms;-o-transition:background
400ms;padding:10px 20px}
.showpageNum a:hover,.showpage
a:hover,.showpagePoint,.blog-pager-newer-link,.blog-pager-older-link,.home-link{background:#2980b9;color:#FFF}
.showpageOf{display:none!important}
@font-face{font-family:'font-style:normal;font-weight:700;src:local('OpenSansBold'),
local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff)
format('woff')}
// * Green Style 3 ------------------------------------------ *//
#blog-pager{float:left;font-size:16px;line-height:normal;margin:0
20px;padding:2em 0}
.showpageNum a,.showpage
a,.showpagePoint{background:#2ecc71;border:none;border-bottom:3px solid
#208C4D;color:#FFF;font-size:15px;font-family:open
sans;font-weight:700;margin-left:10px;border-radius:5px 5px 5px
5px;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px;-o-border-radius:5px
5px 5px 5px;transition:background 400ms;-webkit-transition:background
400ms;-moz-transition:background 400ms;-o-transition:background
400ms;padding:10px 20px}
.showpageNum a:hover,.showpage
a:hover,.showpagePoint,.blog-pager-newer-link,.blog-pager-older-link,.home-link{background:#27ae60;color:#FFF}
.showpageOf{display:none!important}
@font-face{font-family:'font-style:normal;font-weight:700;src:local('OpenSansBold'),
local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff)
format('woff')}
//* Dark Style 4 ----------------------------------------------- *//
#blog-pager{float:left;font-size:16px;line-height:normal;margin:0
20px;padding:2em 0}
.showpageNum a,.showpage
a,.showpagePoint{background:#34495e;border:none;border-bottom:3px solid
#202D3A;color:#FFF;font-size:15px;font-family:open
sans;font-weight:700;margin-left:10px;border-radius:5px 5px 5px
5px;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px;-o-border-radius:5px
5px 5px 5px;transition:background 400ms;-webkit-transition:background
400ms;-moz-transition:background 400ms;-o-transition:background
400ms;padding:10px 20px}
.showpageNum a:hover,.showpage
a:hover,.showpagePoint,.blog-pager-newer-link,.blog-pager-older-link,.home-link{background:#2c3e50;color:#FFF}
.showpageOf{display:none!important}
@font-face{font-family:'font-style:normal;font-weight:700;src:local('OpenSansBold'),
local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff)
format('woff')}
Adding Tutorial of Next & Previous Numbered in your Blog/Blogger in Urdu and Hindi
Now Just Save Your Template
You're done!
How're the next and previous
pagination buttons? I hope it’s working and looking cool on your blog. However,
if you are facing any problem in implementing them in your blog then feel free
to ask below in comments and also leave with your views and share this with
your friends.
AOA
ReplyDeletesir ap ny blog bot zbrdst bnaya hy lekn yh jo screen may right and left sight py 2 window sat play hti hyn yh bot dstrb krti hyn reading krty wkt.
Wa-alaikum Salam.
ReplyDeleteThanks for comment.
You can Change your Browser Size and Then You can See all things.
hi bhai kya hall hy kya aap mera blog review kr skty hen plz ma itni ammer nhi hu ici socha blog k zariye earning start kru number navigation add nhii ho rha kindly agr aap mjy edit kr den aap ki mehebani hogi plz
ReplyDeletemjy email py jwab den salmaghazal384@gmail.com
nothing works for me really dissapointed
ReplyDeletenot working
ReplyDelete