Notification texts go here Contact Us Buy Now!

Guide to use Split Post

image_title_here
Useful for splitting articles into multiple pages

Demo Page one

Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse modi sequi qui molestiae provident repellat placeat debitis, nihil odit quisquam molestias cumque exercitationem excepturi temporibus corporis vitae voluptatem? Adipisci, illo.

Demo Page two

image_title_here
Useful for splitting articles into multiple pages

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Neque iusto est culpa! Accusantium suscipit sunt exercitationem, molestiae quaerat delectus doloribus asperiores omnis facere vel, fugiat error, quis quidem culpa quod?
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit molestiae sunt qui, quo praesentium debitis quia atque ullam officiis cum odit accusantium velit amet? Sit rem repudiandae et provident odit!

image_title_here
Useful for splitting articles into multiple pages

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit molestiae sunt qui, quo praesentium debitis quia atque ullam officiis cum odit accusantium velit amet? Sit rem repudiandae et provident odit!

Guide to creating a split post

  1. Copy the code from the below code box.
  2. In the Blogger post editor please change it to HTML View.
  3. Paste all the copied code into your post.

Example code

<div id="postSplit">
  <p>Demo Page one</p>

  <!--nextpage-->
  <p>Demo Page two</p>

  <!--nextpage-->
  <p>Demo Page three</p>
</div>

<script>
  /*<![CDATA[*/ document.addEventListener('DOMContentLoaded', function() {function checkChildren(nodes, elemId){for(i=0;i<nodes.length;i++){if(nodes[i].id==elemId){return nodes[i];}else{return checkChildren(nodes[i].children, elemId);}}} function isNumeric(value) {var type = typeof value; return (type === 'number' || type === 'string') && !Number.isNaN(value - Number.parseFloat(value));} var nodes = document.querySelector('div.postBody').children; var splitdong = checkChildren(nodes, 'postSplit').innerHTML; var content = splitdong.split('<!--nextpage-->'); var url = window.location.href; var url = url.split('?page='); var no = url[1] + '&m=4'; var no = no.split('m'); var no = no[0]; var no = no.replace('&', ''); var url = url[0]; var i = 1; if( !isNumeric(no) ){var no = 1;} document.getElementById('postSplit').innerHTML = content[no-1]; if( content.length > 1 ) {document.getElementById('postSplit').innerHTML += "<div class='postNav' id='postPager'><span class='page current'>Pages :</span></div>";} if( no>1 ){document.getElementById('postPager').innerHTML += "<!-- <a href='"+url+"?page="+(no-1)+"' title='Previous Page'>Prev</a> -->";} content.forEach(function(item) { if( no == i ){document.getElementById('postPager').innerHTML += "<span class='current'>"+i+"</span>";} else {document.getElementById('postPager').innerHTML += "<a href='"+url+"?page="+i+"'>"+i+"</a>";} i++; }); if(content.length > no){ var nn = parseInt(no) + 1; document.getElementById('postPager').innerHTML += "<a href='"+url+"?page="+nn+"'>Next</a>";} }); /*]]>*/
</script>
Note : -
<div id='postSplit'> - Must exist as main container and all articles must be in this code.
<!--nextpage--> - Useful for adding new pages, you can add this tag to split a post into an unlimited number of pages, put each content for the next page just below this tag.
Music_Wallpaper.png Music 3.05MB 1920×1080 .png

Getting Info...

About the Author

Just a guy who is interested in modern technology. I love to learn new things and share what I know with others.

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.