Show all post as a list of a label to Blogger

 

Label posts in list to Blogger

Hello friends, this awesome trick of Blogger where you can show your posts of the specific label as a list form. To do this just copy this code and paste on page, post or sidebar of your blog.


Snapshot of working code.

 Just replace the yellow color marked text from code.

Copy this code:

<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>
<ul>
<script src=”http://feedletters.blogspot.com/feeds/posts/default/-/Label?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts&amp;max-results=999″></script>
</ul>



Article "Show all post as a list of a label to Blogger" protected

Post a Comment

Previous Post Next Post