Don't Show Again Yes, I would!

Membuat Postingan Blog Menjadi Beberapa Halaman

Membuat Postingan Blog Menjadi Beberapa Halaman

Mangaip.com – Membuat postingan blog menjadi beberapa halaman. Pada dasarnya halaman posting di blog tidak bisa dibagi secara terpisah. Tapi seiring perubahan teknologi maka ada beberapa platform web/blog yang memakai pemisah halaman.

Bagi blog wordpress, mungkin hal ini tidak terlalu sulit. Karena sudah ada beberapa plugin yang bisa kamu pakai untuk memisahkan halaman blog menjadi beberapa bagian.

Kalau untuk blogger, perlu beberapa kode yang harus diterapkan kedalam template atau tema blog.
Bagi sobat yang ingin membuat postingan terpisah dengen penomoran dibawah artikel. Silahkan gunakan kode dibawah ini.

Cara Membuat Postingan Blog Menjadi Beberapa Halaman Atau PostinganTerpisah

Copas Kode dibawah ini pada postingan dengan mode HTML jangan mode Compose


<style>
.button-box{margin:30px 0;text-align:center;}
#page1,#page2,#page3,#page4,#page5{display:none}
#page1.current{display:block}
a.button-pager{height:30px;line-height:30px;padding:0 20px; margin:0 5px 0 0;text-align:center;background:#ddd;color:#333;cursor:pointer;display:inline-block;}
a.button-pager.current{background:#333;color:#fff;}
</style>
<div id='topcontent'></div>
<div id="page1" class="current">
Content 1 tulis di sini......
</div>
<div id="page2">
Content 2 tulis di sini......
</div>
<div id="page3">
Content 3 tulis di sini......
</div>
<div id="page4">
Content 4 tulis di sini......
</div>
<div id="page5">
Content 5 tulis di sini......
</div>
<div class="button-box">
<a class="button-pager current" id="button1" href="?page1#topcontent">1</a>
<a class="button-pager" id="button2" href="?page2#topcontent">2</a>
<a class="button-pager" id="button3" href="?page3#topcontent">3</a>
<a class="button-pager" id="button4" href="?page4#topcontent">4</a>
<a class="button-pager" id="button5" href="?page5#topcontent">5</a>
</div>
<script>
//<![CDATA[
var p1=document.getElementById("page1"),p2=document.getElementById("page2"),p3=document.getElementById("page3"),p4=document.getElementById("page4"),p5=document.getElementById("page5"),b1=document.getElementById("button1"),b2=document.getElementById("button2"),b3=document.getElementById("button3"),b4=document.getElementById("button4"),b5=document.getElementById("button5");window.location.href.search("page1")>0&&(p1.style.display="block",p1.classList.add("current"),b1.classList.add("current"),p2.style.display="none",p2.classList.remove("current"),b2.classList.remove("current"),p3.style.display="none",p3.classList.remove("current"),b3.classList.remove("current"),p4.style.display="none",p4.classList.remove("current"),b4.classList.remove("current"),p5.style.display="none",p5.classList.remove("current"),b5.classList.remove("current")),window.location.href.search("page2")>0&&(p1.style.display="none",p1.classList.remove("current"),b1.classList.remove("current"),p2.style.display="block",p2.classList.add("current"),b2.classList.add("current"),p3.style.display="none",p3.classList.remove("current"),b3.classList.remove("current"),p4.style.display="none",p4.classList.remove("current"),b4.classList.remove("current"),p5.style.display="none",p5.classList.remove("current"),b5.classList.remove("current")),window.location.href.search("page3")>0&&(p1.style.display="none",p1.classList.remove("current"),b1.classList.remove("current"),p2.style.display="none",p2.classList.remove("current"),b2.classList.remove("current"),p3.style.display="block",p3.classList.add("current"),b3.classList.add("current"),p4.style.display="none",p4.classList.remove("current"),b4.classList.remove("current"),p5.style.display="none",p5.classList.remove("current"),b5.classList.remove("current")),window.location.href.search("page4")>0&&(p1.style.display="none",p1.classList.remove("current"),b1.classList.remove("current"),p2.style.display="none",p2.classList.remove("current"),b2.classList.remove("current"),p3.style.display="none",p3.classList.remove("current"),b3.classList.remove("current"),p4.style.display="block",p4.classList.add("current"),b4.classList.add("current"),p5.style.display="none",p5.classList.remove("current"),b5.classList.remove("current")),window.location.href.search("page5")>0&&(p1.style.display="none",p1.classList.remove("current"),b1.classList.remove("current"),p2.style.display="none",p2.classList.remove("current"),b2.classList.remove("current"),p3.style.display="none",p3.classList.remove("current"),b3.classList.remove("current"),p4.style.display="none",p4.classList.remove("current"),b4.classList.remove("current"),p5.style.display="block",p5.classList.add("current"),b5.classList.add("current"));
//]]>
</script> 

Silahkan sesuaikan konten atau tulisannya sesuai dengan keinginan kamu. Gunakan juga penomorannya sebijak mungkin.

Kode diatas adalah kode dari Mas Adhy pemilik Kompi Ajaib. Kode tersebut maksimal hanya sampai 5 halaman saja.

Manfaat dari kode pagination posts ini salah satunya yaitu menampilkan iklan disetiap halaman posts. Tentu akan sangat berpeluang terhadap penghasilan iklan pada blog kamu.

Share:

Mangaip

Halo perkenalkan nama saya Mangaip. Saya merupakan konten kreator, influencer, dan penulis di blog ini. Jangan lupa ikuti kami di Google News. Gabung juga ke channel Telegram untuk mendapatkan terbaru Gabung Telegram ya Bestie!

Leave a Reply

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