Show all post as list of a label to Blogger

Share Now:

Label posts in list to Blogger

Hello friends, this awesome trick of Blogger where you can show your posts of specific label as 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://www.vikinspire.com/feeds/posts/default/-/Label?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts&amp;max-results=999"></script>
</ul>

Keywords: posts in list of label, show posts as list in Blogger, Show all post as list of a label to Blogger, Label posts as list form to Blogger, Blogger Tricks, Blogger tips, blogging methods, Blogger code, blogger script.

13 comments:

  1. thanks :) !!! it helped me ..........

    ReplyDelete
  2. I was so excited when I got this to work on my blog! I did it as a "Test" page first, and it was perfect. Then I deleted that page, and now I can't get it to work again. I've tried creating new pages, editing old ones, etc., and I just can't get it to work. Any ideas why?

    ReplyDelete
    Replies
    1. After pasting above code in "HTML" mode on post paste. Don't select "compose" tab on post dashboard. Means just paste code in HTML mode and replace all text according your blog. After that directly go to "Publish" mode. Make sure if select "compose mode" the code will be destroyed and it will not work. So, notice it. Because it little bit tricky.

      Delete
  3. Again copy the fresh code from this page. Make sure, try to save the page in "Edit HTML" mode. Check this...https://4.bp.blogspot.com/-21CsMOstG8Y/WWDiUMwRr7I/AAAAAAAADSc/FxYUraago3gGUuEazfoYegEGdtXlVcpxwCLcBGAs/s1600/Untitled.png

    ReplyDelete
  4. This worked great. Thank you.

    Is there an extra bit that can be added to generate the post date next to the title?

    ReplyDelete
  5. Thank you VISHAL JAISWAL for this great Widget.

    Bro. I have a blog with a lot of posts. Some of label with more then 300 posts. In this moment this widget showing all of the posts in a single page. It is not good for my visitor.

    So, do you can please tell me that how I can show number navigation system in my page?

    ReplyDelete
    Replies
    1. You can manually create other page split page list 10-10 or according to your numbers of posts which you want to show.

      Delete
    2. Do you can tell how to do it?

      From the second line of the code: var numposts = 100;

      I have changed the "100" number into "10" and tried to do it. But in second page it is showing same "10" posts.

      How I will show post like; (1st page = 1-10 posts and 2nd page = 11-20 post)?

      Delete
    3. Sorry! You are asking like WordPress function. It is not possible on Blogger. There are lots of limitation in Blogger. You should go with manually by copying and pasting.

      Delete
  6. Sir, this coding is not working on my blog or new blog default template.
    I was replace the site URL and label but no success.

    ReplyDelete
    Replies
    1. After pasting above code in "HTML" mode on post paste. Don't select "compose" tab on post dashboard. Means just paste code in HTML mode and replace all text according your blog. After that directly go to "Publish" mode. Make sure if select "compose mode" the code will be destroyed and it will not work. So, notice it.

      Delete

You can write your queries or suggestion below in comment box. Please support "Online Discussion Forum".