Inactive blog. If you need anything, contact me : lloydalemania@gmail.com Hire me

Create HTML Sitemap for Specific Label in Blogger

Introduction

I've seen too many bloggers that ask about creating an HTML sitemap for a specific label in Blogger. So today, I decided to make a post about this topic! And I hope it solves your problem.

Add Single Labelled HTML Sitemap

Go to Blogger.com >> Pages >> Add New Page. Then, just paste the code that's given below!

Code

<script type="text/javascript">
var totalposts = 200;
var standardstyling = true;
function showrecentposts(json) {
for (var a = 0; a < totalposts; a++) {
var entry = json.feed.entry[a];
var posttitle = entry.title.$t;
var posturl;
if (a == json.feed.entry.length) break;
for (var b = 0; b < entry.link.length; b++) {
if (entry.link[b].rel == 'alternate') {
posturl = entry.link[b].href;
postimg = entry
break;
}}
posttitle = posttitle.link(posturl);
if (standardstyling) document.write('<li>');
document.write(posttitle);}
if (standardstyling) document.write('</li>
');
}
</script>
<br />
<ul>
<h3>Label</h3>
<script src="https://blog-url.blogspot.com//feeds/posts/default/-/label?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts&amp;max-results=999"></script>
</ul>
Just replace:
Label -> your label
blog-url -> your blog url
label -> the label you want

P.s. If your blogger label is separated in two sentences E.x. "Popular Posts" then the link will be "popular%20posts.". So, just replace the space with %20.

And that's all! I hope it works for all of you!

2 comments

[default]

mba-1

[enabled]

521946774841758
  • Mailing List

    Sign up with your email address to receive news and updates straight in your inbox.

  • 1% Task has expired.