How to Create HTML Sitemap in Blogger

Updated blog here: https://werkify.blogspot.com/2023/05/how-to-create-html-sitemap-in-blogger.html A Sitemap is very important in a blog or website. It is a requirement for a blog to be indexed in search engines like Google, Bing and Yahoo search. There are various types of Sitemap but the most popular Sitemaps are in XML and HTML format.

Here is the guide on how to create an HTML Sitemap in your Blogger blog. This guide also works on WordPress. 

1.  Login to your Blogger Dashboard

2.  Then go to Pages > Create New Page

 

3. After creating a New Page. Fill up the title (e.g. HTML Sitemap or Sitemap). Click ‘HTML’ and delete the existing code. 

 


4. Copy this code

<script type='text/javascript'>

var postTitle = new Array();
var postUrl = new Array();
var postPublished = new Array();
var postDate = new Array();
var postLabels = new Array();
var postRecent = new Array();
var sortBy = "titleasc";
var numberfeed = 0;

function bloggersitemap(a) {
    function b() {
        if ("entry" in a.feed) {
            var d = a.feed.entry.length;
            numberfeed = d;
            ii = 0;
            for (var h = 0; h < d; h++) {
                var n = a.feed.entry[h];
                var e = n.title.$t;
                var m = n.published.$t.substring(0, 10);
                var j;
                for (var g = 0; g < n.link.length; g++) {
                    if (n.link[g].rel == "alternate") {
                        j = n.link[g].href;
                        break
                    }
                }
                var o = "";
                for (var g = 0; g < n.link.length; g++) {
                    if (n.link[g].rel == "enclosure") {
                        o = n.link[g].href;
                        break
                    }
                }
                var c = "";
                if ("category" in n) {
                    for (var g = 0; g < n.category.length; g++) {
                        c = n.category[g].term;
                        var f = c.lastIndexOf(";");
                        if (f != -1) {
                            c = c.substring(0, f)
                        }
                        postLabels[ii] = c;
                        postTitle[ii] = e;
                        postDate[ii] = m;
                        postUrl[ii] = j;
                        postPublished[ii] = o;
                        if (h < 10) {
                            postRecent[ii] = true
                        } else {
                            postRecent[ii] = false
                        }
                        ii = ii + 1
                    }
                }
            }
        }
    }
    b();
    sortBy = "titledesc";
    sortPosts(sortBy);
    sortlabel();
    displayToc();
}

function sortPosts(d) {
    function c(e, g) {
        var f = postTitle[e];
        postTitle[e] = postTitle[g];
        postTitle[g] = f;
        var f = postDate[e];
        postDate[e] = postDate[g];
        postDate[g] = f;
        var f = postUrl[e];
        postUrl[e] = postUrl[g];
        postUrl[g] = f;
        var f = postLabels[e];
        postLabels[e] = postLabels[g];
        postLabels[g] = f;
        var f = postPublished[e];
        postPublished[e] = postPublished[g];
        postPublished[g] = f;
        var f = postRecent[e];
        postRecent[e] = postRecent[g];
        postRecent[g] = f
    }
    for (var b = 0; b < postTitle.length - 1; b++) {
        for (var a = b + 1; a < postTitle.length; a++) {
            if (d == "titleasc") {
                if (postTitle[b] > postTitle[a]) {
                    c(b, a)
                }
            }
            if (d == "titledesc") {
                if (postTitle[b] < postTitle[a]) {
                    c(b, a)
                }
            }
            if (d == "dateoldest") {
                if (postDate[b] > postDate[a]) {
                    c(b, a)
                }
            }
            if (d == "datenewest") {
                if (postDate[b] < postDate[a]) {
                    c(b, a)
                }
            }
            if (d == "orderlabel") {
                if (postLabels[b] > postLabels[a]) {
                    c(b, a)
                }
            }
        }
    }
}

function sortlabel() {
    sortBy = "orderlabel";
    sortPosts(sortBy);
    var a = 0;
    var b = 0;
    while (b < postTitle.length) {
        temp1 = postLabels[b];
        firsti = a;
        do {
            a = a + 1
        } while (postLabels[a] == temp1);
        b = a;
        sortPosts2(firsti, a);
        if (b > postTitle.length) {
            break
        }
    }
}

function sortPosts2(d, c) {
    function e(f, h) {
        var g = postTitle[f];
        postTitle[f] = postTitle[h];
        postTitle[h] = g;
        var g = postDate[f];
        postDate[f] = postDate[h];
        postDate[h] = g;
        var g = postUrl[f];
        postUrl[f] = postUrl[h];
        postUrl[h] = g;
        var g = postLabels[f];
        postLabels[f] = postLabels[h];
        postLabels[h] = g;
        var g = postPublished[f];
        postPublished[f] = postPublished[h];
        postPublished[h] = g;
        var g = postRecent[f];
        postRecent[f] = postRecent[h];
        postRecent[h] = g
    }
    for (var b = d; b < c - 1; b++) {
        for (var a = b + 1; a < c; a++) {
            if (postTitle[b] > postTitle[a]) {
                e(b, a)
            }
        }
    }
}



function displayToc() {
    var a = 0;
    var b = 0;
    while (b < postTitle.length) {
        temp1 = postLabels[b];
        document.write("");
        document.write('<div class="post-archive"><h4>' + temp1 + '</h4><div class="ct-columns">');
        firsti = a;
        do {
            document.write("<p>");
            document.write('<a " href="' + postUrl[a] + '">' + postTitle[a] + "");
            if (postRecent[a] == true) {
                document.write(' - <strong><span>New!</span></strong>')
            }
            document.write("</a></p>");
            a = a + 1
        } while (postLabels[a] == temp1);
        b = a;
        document.write("</div></div>");
        sortPosts2(firsti, a);
        if (b > postTitle.length) {
            break
        }
    }
}

</script>

<script src="http://www.yourblog.blogspot.com/feeds/posts/summary?alt=json-in-script&max-results=9999&callback=bloggersitemap" type="text/javascript"></script>

 


5. Paste the code.  Search this code to change the web address into your own web address.

 

Search this: 

<script src="https://yourblogname.blogspot.com/feeds/posts/default?max-results=9999&amp;alt=json-in-script&amp;callback=bloggersitemap"></script>

Change this: 

<script src="https://yourblogname.blogspot.com/feeds/posts/default?max-results=9999&amp;alt=json-in-script&amp;callback=bloggersitemap"></script>


Trafixxo Blog HTML Sitemap: https://trafixxo.blogspot.com/p/sitemap.html

24 comments:

  1. Hello, I just found the information I was looking for here just now. Now, am happy I visited your blog while looking for;
    Flash File Download
    stock rom download
    Nigeria music Download
    latest naija music
    Thanks bro. I like your blog Design. Can I get such?

    ReplyDelete
  2. It is advisable that for a resolution to all the issues and errors the user gets connected at yahoo support number UK for help. It often becomes tricky for the users to deal with the issues and errors without proper help, support, and guidance from the team of trained and certified Yahoo technical experts they can be asked for help as and when needed. Yahoo Contact Number

    ReplyDelete
  3. Your sitemap code is arranged neatly and I going to put it on my blogspot blog https://www.supermoonhost.com

    ReplyDelete
  4. Thanks for good sharing, this post is Most usefull information.If you need to change calendar settings on AOL mail then, in that case, it is advisable to see and change the default view after that the user should check the time zone and should get that changed, if needed then for further information the user should get connected with the team of trained and certified AOL Mail Contact Number experts.

    ReplyDelete
  5. Bro, you write too good especially the last part it was damn. If you wanna make your site map you can visit SEO Media

    ReplyDelete
  6. brilliantly insightful post. If only it was as easy to implement some of the solutions as it was to read and nod my head at each of your points new york web design company

    ReplyDelete
  7. your script is not working https://www.desibaba.co.in/p/sitemap.html

    ReplyDelete
  8. pomysł na prezent na święta prezenty na święta 2020

    ReplyDelete
  9. skincell pro amazon - What are the benefits of skin cell pro? I was looking for a cure-all product to use on my face that would make my problem go away. My face had always been prone to acne and had several scars from acne. However, my skin was dry, and the acne had largely disappeared. I didn't have any breakouts, yet I decided to give skincell pro a try. I read several reviews online and was intrigued by the positive feedback I got from others.

    ReplyDelete
  10. Sprawdź jaki bank na konto firmowe na pierwsze konto w banku

    ReplyDelete
  11. skincell pro mole and skin tag remover skincell pro on lyncvoiceuc.com

    ReplyDelete
  12. skincell pro ebay skincell pro skin tag remover

    ReplyDelete
  13. Swimming Pools Denver Colorado - We offer custom swimming pools in Denver CO. We are a professional Denver pool builder and one of the best pool construction companies in Denver, Colorado. Contact us now!

    ReplyDelete
  14. Plumbing Company Denver - Drain Terrier is the top-rated plumbers in Denver Colorado and drain cleaning company in Denver. Book the best plumbers in Denver, CO or call (720) 999-6120. We are family owned and operated with more than 30 years of experience in plumbing and drains. We care most about earning repeat customers, which is why our goal is to make sure that each of our customers are satisfied with our services, every time.

    ReplyDelete
  15. Blinds Cutting Machine - Cutting table REXEL US-1 is a modern, powerful and professional piece of equipment for roller blinds manufacturing. Main advantages of the table.

    ReplyDelete
  16. In Astrology, 8th house jupiter makes a person a healer, with a strong spiritual mind, long life, and the native's desire to rise.

    ReplyDelete
  17. eAstroHelp is India's leading website for Astrology-based resources. The Company aims at promoting ancient occult science from India across the globe. Aquarius pisces cusp

    ReplyDelete

Powered by Blogger.