HOW TO CREATE A SITEMAP PAGE

 

how to create sitemap page in blogger

Go To Blogger / WordPress

  • Pages -> New Pages.
  • Switch To HTML Tab.
  • Delete all codes.
  • Paste this code and change the URL in the last line.
  • Click on save then click publish.



<script type=”text/javascript”>

 var numposts = 100;
 var standardstyling = true;

 function showrecentposts(json) {
  for (var i = 0; i < numposts; i++) {
   var entry = json.feed.entry[i];
   var posttitle = entry.title.$t;
   var posturl;
   if (i == json.feed.entry.length) break;
   for (var k = 0; k < entry.link.length; k++) {
    if (entry.link[k].rel == ‘alternate’) {
     posturl = entry.link[k].href;
     break;
    }
   }
   posttitle = posttitle.link(posturl);
   if (standardstyling) document.write(‘<li>’);
   document.write(posttitle);
  }
   if (standardstyling) document.write(‘</li>’);
 }
</script>

<br />
<ul>
 <script src=”https://YOURBLOG.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentposts&max-results=999″></script>
</ul>

About Mudassar Nazir

Author and Owner of Mudassar World

View all posts by Mudassar Nazir →

Leave a Reply

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