How to Divide Post into Pages in Blogspot Blog With Refresh Function

3 Min Read

Today I will share a tutorial on how to make a pagination number in your post. Pagination numbers like this we usually encounter on news websites or blogs that have long articles, this is done so that readers do not get bored with articles that are too long down and also useful so that readers are detected active on the blog.

This pagination tutorial uses a new script and is also automatic unless settings for the parts of the article you want to make appear in a certain number, then this will make it easier for you to arrange the parts of the article to be removed and appear on the next page.

The amount for this pagination unlimited friend can create as many pages as possible and equipped with measuring 768×90 ad column. When switching pages, the bloge will automatically refresh to the next article page.

Interested in making pagination on blog posts? Please follow the tutorial below:

Go to Blogger>Themes>Edit Html

Put the CSS below right above the code, ]]></b:skin> you can also place it above </style> and use the conditional tag.


/* Pagination CSS */
.post-content{display:none}.dblanter{font-size:130%;text-align:center}
.paging .tombol,.paging:before{font-size:14px;padding:8px 12px}
.paging{margin:20px auto;font-weight:bold;text-align:center;width:100%;font-family:Roboto,Arial,sans-serif}
.paging .tombol{font-weight:700;background:#2196f3;border-radius:5px;display:inline-block;width:25px;color:#fff;margin-right:5px;transition:ease .69s!important}
.tombol.blanter{background:#000}
.paging:before{content:'PAGES : ';font-weight:Bold;border:1px solid #2196f3;color:#2196f3;border-radius:5px;margin-right:10px}
@media screen and (max-width:768px){.paging .tombol,.paging:before{padding:8px 5px}}

Next, put Javascript below right above the code </body>


<script style='text/javascript'>
//<![CDATA[
function get_n(n){var o,t,e=decodeURIComponent(window.location.search.substring(1)).split("&");for(t=0;t<e.length;t++)if((o=e[t].split("="))[0]===n)return void 0===o[1]||o[1]}$(document).ready(function(){var n=get_n("n");$(".post-content").hide(),void 0===n?$(".content_1").show():$(".content_"+n).show();var o=$(".post-content").length;if(0!=o)for(i=1;i<=o;i++){var t=window.location.pathname;$("p.paging").append($('<a href="'+t+"?n="+i+'" class="tombol n'+i+'"> '+i+" </a>"))}else $("p.paging").hide();void 0==n&&$(".tombol.n1").toggleClass("blanter"),n==n&&$(".tombol.n"+n).toggleClass("blanter")});
//]]>
</script>

To bring up the pagination number button automatically in all articles, put the code below the <data:post.body> code like this is a lot. somake sure to try one by one.


<div class='dblanter'><b>HALAMAN SELANJUTNYA:</b></div><br/>
<center><a href='#' target='_blank' title='Kunjungi blog Dunia Blanter'><img alt='iklan banner' src='https://4.bp.blogspot.com/-6ZDrg7GHPa4/VytnmRI9BaI/AAAAAAAAD0w/dyOGpRSMe78xiIGN4sDumyA-VGDjDYksACLcB/s1600/AdSpace768x90.png' title='Kunjungi blog Dunia Blanter'/></a></center>
<br/><p class='paging'/>

The final step, you have to do the manual settings to set each of the words in the post so that it appears on the page you want through Edit Post>enter HTML mode instead of compose, the code like this


<div class="post-content content_1">
</div>

Replace number 1 with 2,3,4,5 and son on.

Like this


<div class="post-content content_1">
Teks Postingan 1
</div>
<div class="post-content content_2">
Teks Postingan 2
</div>
<div class="post-content content_3">
Teks Postingan 3
</div>

That’s it. I hope it will be useful for you.

Share This Article
By admin Administrator
Follow:
Success is no accident. It is hard work, perseverance, learning, studying, sacrifice and most of all, love of what you are doing or learning to do.