September 2, 2014

How to create a sitemap for a particular label?

Create a sitemap for a particular label

This is very simple to do and this will get your blog posts a higher ranking in search results.

Follow the below steps:

  • Log in to your blogger account.
  • Navigate to Pages > New Page > Blank Page.
  • Switch it to HTML mode.
  • Now paste below code in the post body.

Coding

<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('
  • '); document.write(posttitle);} if (standardstyling) document.write('
  • '); } </script> <ol> <script src="http://thelittletechie.blogspot.com/feeds/posts/default/-/Your%20Label?orderby=published&alt=json-in-script&callback=showrecentposts&max-results=999"></script> </ol>

    • Replace thelittletechie.blogspot.com with your own blog URL and Your%20Label with label for which you want to create a page.
    • Tip: If you have single word as your label page like “HTML” then replace Javascript%20Tutorials with HTML but if you have more than one word in your label name then put %20 between them to separate them. The name is case sensitive. So, take care of it.
    • Now click on Publish button.
    • You are done.

    Now use you created page URL whenever you need to link your category (label page). It will boost the page rank of all of your blog posts.

    No comments:

    Post a Comment

    Popular Posts

    Views