Listing post titles in alphabetical or chronological order

In this tutorial I will show you how to list the titles of your blog’s 1000 2000 most recent  posts. If you are looking for an alternative to Blogger’s Archive gadget, then this might be it. This list can also be used as a Table Of Contents. This list is made possible with the use of Yahoo! Pipe.

See the demo in Blogger Sentral Widget Showcase.

post title alphabetical order

The list comes with several options:

  1. List them inside a widget or in a post static page.
  2. Arrange the titles in alphabetical or chronological order. If you use your blog as an online serial novel, then chronological order is just what you need.
  3. Append (or not) a comment count at the end of each title.
  4. Choose numbered or bulleted list style.

Let’s get started,


1) The code

<!-- Alphabetical/chronological Post Title Listing with comment count Start -->
<script type="text/javascript">
function getYpipeTL(feed) {
 document.write('<ul style="font-weight:bold">');
 var i;
 for (i = 0; i < feed.count ; i++)
var href = "'" + feed.value.items[i].link + "'";
var pTitle = feed.value.items[i].title;
var pComment = " \(" + feed.value.items[i].commentcount + " comments\)";
var pList = "<li>" + "<a href="+ href + '" target="_blank">' + pTitle;
 document.write(pComment); //to remove comment count delete this line
 <script src="
<span style="font-size: 80%; float:right;">Get this <a href="" target="_blank">widget</a></span>
<!-- Alphabetical Post Title Listing End -->


2) Put the list in a (dedicated) post page

Use this option if you want to put the list on a separate page. (You can then access it via a tab.)

  1. Create a new page by going to Posting > Edit Pages and clicking the New Page button.
  2. Click Edit HTML tab to switch to HTML mode.
  3. Copy and paste the code into the editor.
  4. Click Post Options at the bottom of the editor. Under the Edit HTML Settings heading, select Ignore newlines.
    post options
  5. Publish and view your post . The list should appear inside the page.
  6. Then add a link to the page from your homepage. This can be done by adding navigation tabs. If you have the page gadget installed, this is added automatically by Blogger.
  7. If you want to remove the extras (sidebars, footer etc.) from the page, read Apply different layout/styling to static pages.

    3) Put the list in a gadget

    Use this option if you want to put the list on a sidebar, making it visible at all times.

    1. Go to Design > Page Elements.
    2. Click Add A Gadget link.
    3. Select HTML/Javascript gadget.
    4. Enter the title of your widget e.g. All Posts List.
    5. Copy and paste the code inside the content box.

      Replace (the value of YourBlogUrl) in code line 20 with your own blog URL. Do not include the trailing slash (as in .com/). Refer to step 4 for options/customizations.

      Reminder: In the process of editing your code, never switch to Rich Text mode. Doing so will add line breaks (<br/>) in your code, rendering the code useless.

    6. Save and view your blog.


    4) Customizing the list

    Below are a few available customizations/options:

    • Listing order -the default order is alphabetical. To change to chronological order, just change the word alphabet in code line 21 to chrono.
    • Comment count - comment count is displayed by default. To remove comment count, delete code line 13.
    • List style -the default is bulleted list. To change to numbered list, replace ul (in line 4 and 16) with ol.
    • Style the list with the inline style attribute in line 4.
    • If your list becomes too long, you might want to put it in a scroll box


    5) Editing the pipe (optional)

    If you want further customize the widget output, you need to edit the (Yahoo) pipe itself. Follow the steps below:

    1. Go to the Yahoo! pipe.
    2. Log in to your Yahoo! account.
    3. Create a clone by clicking the Clone button.
    4. Click edit source to edit it in anyway you like.
    5. When you’re done editing and saving, test run it by clicking Run Pipe button to confirm the output of the pipe.
    6. To use your edited pipe, copy the pipe id and paste it to replace the existing id in line 22. (To get the id, look in your browser’s address bar. The id is the end part the URL when you are viewing or editing the pipe.)




    Nov 2011: Increase number of posts from 1000 to 2000.

    Mar 28 2010: “undefined” comment count. Blogger renamed the comments count item (in posts feed), thus causing the error. I fixed the pipe, it’s okay now. If you cloned my pipe before, please clone again.

    Dec 21 2009: Revised code and pipe to include comment count, with removal option. Also added chronological order option.

    297 comments to "Listing post titles in alphabetical or chronological order"

    «Oldest ‹Older 201 – 297 of 297 Newer› Newest»
    David Andrews September 19, 2011 at 7:26 AM    

    I like this widget a lot, but I need help to just list all post in alphabetical order by label.

    I know that I have to use Yahoo pipes or something, but can you please talk me through this procedure please?

    Greenlava September 20, 2011 at 10:47 AM    

    @The Reviewer
    I've answered similar question before. Please read reply #9.

    James Lee September 26, 2011 at 2:25 PM    

    Thank You Greenlava... Awesome Widget

    Lisa Turner October 2, 2011 at 12:25 PM    

    Thanks very much for sharing this tool. I've been searching for days for a solution for a recipe index page on my blog, and here it is. Works great.

    nikos,  October 13, 2011 at 1:20 AM    

    Hi! Can you please help me with that? i did the pipe, i get the results, i copied the code, i changed id and site url but...nothing!
    link to the page that i try to do that:

    Greenlava October 13, 2011 at 6:43 PM    

    I see you've got it fixed. It looks fine :)

    Vaccinius October 15, 2011 at 7:02 AM    

    Fantastic! Extraordinary love is what you show. It works like a charm and it made my day. I do not have a Yahoo account, though, and I have no idea what "Pipes" is. So I use your ID. Will that put me into trouble at any time?

    God bless you!

    HD Cafe October 17, 2011 at 12:43 AM    

    Thanks for cool widget.

    admin October 17, 2011 at 1:35 AM    

    how to insert date ? the suggestion you gave in comment#31 is not working. can you pls tell me

    Anonymous,  October 17, 2011 at 2:38 AM    

    This is brilliant, looks lovely and styles itself to my blog perfectly, but I'm yet another one who wants to list the posts in reverse chrono (latest at top of list).

    Please don't refer me to post 34 as most people here have absolutely no idea what you mean when you say: "Connect a direct pipe from the output of the Rename module to Pipe Output module, bypassing the split, filter, sort and union modules."

    That's complete gobbledegook to most of us - we need it in simple terms, please?

    Greenlava October 18, 2011 at 10:03 AM    

    @Anders Woje Ellingsen
    No trouble at all...oh but there is -the pipe might stop working (for a few hours) once in a while due to bandwidth limit.

    I haven't find any other solution that doesn't involve editing the pipe, hence the gobbledegook. Maybe you want to give it a try. It's not really that bad, you'll find yourself going 'aha!' in no time :)

    Vaccinius October 19, 2011 at 9:36 PM    

    I see. Thank you.

    I am sorry to inform you that the link to your pipe given in comment #4 leads nowhere. I had to be clever to find your pipe. :-)

    Greenlava October 20, 2011 at 10:09 AM    

    @Anders Woje Ellingsen
    Use the link given in step 5. They originally pointed to the same pipe (the link broke after Yahoo upgraded their pipe engine).

    IAnn Purugganan October 23, 2011 at 1:08 PM    

    Great Stuff man! Thanks!

    Michael F October 27, 2011 at 9:44 AM    

    Can you please help me? I've tried following your instructions in reply #9, but I'm not getting anywhere. I managed to successfully install the code to a page that lists all the post titles alphabetically. I just want to be able to add pages for different labels so each page only lists the posts for that label. I tried looking in Yahoo Pipes, but I apparently dont have one, and your link to clone yours doesnt look to be working. I'm not a techie, so I do need a little guidance please.

    Here's my blog page

    Greenlava October 27, 2011 at 7:35 PM    

    @Michael F
    I've cloned the pipe and made the needed changes. Here's the URL:

    What you need to do:
    1. Replace the the pipe ID in line 22 with the new pipe ID above.
    2. In line 20 instead of entering your blog URL (
    you should now enter the label feed URL:

    Replace the word "label" with your label. Remember, labels are case sensitive.

    boo October 28, 2011 at 2:51 PM    

    Hi, thank you for this. It's really helpful!
    I was trying to make a drop down menu for post titles from your other post, and was told to install this widget first. The widget worked fine, but wen I try to eliminate the 3 post with the label "criticalthinkingworksheets" none of my post title showed up, I only saw the add this widget link.

    This is what i did:

    I replace this:

    with this:

    Did I do something wrong? Thank you for your help.

    Greenlava October 28, 2011 at 6:39 PM    

    Did you switch to Compose/Rich Text mode during editing? If you did then you need to paste the code all over again.
    Never switch to Compose/Rich Text mode, it'll break the code.

    boo October 29, 2011 at 4:05 AM    

    Thank you for the fast response. I don't think I switch to Rich Text Mode. But I try to paste the code all over again onto a new html/java widget, still only the get this widget link shows up only.

    Can you please help take a look on my blog and see if I did anything wrong?

    It's the first widget on the right side bar named "testing"

    Thank you so much

    Anonymous,  October 29, 2011 at 10:30 AM    

    Great. Thanks. How can I make the list appear in reverse chronological order, ie the newest posts at the top of the list. Thanks if you can help. Your site has very clear explanations

    boo October 30, 2011 at 3:05 AM    

    Thank you so much Greenlava in regards comment no. 227. It wasn't working this morning, but when I came home this after it worked. Just wanted to say thank you! You are the best.

    Greenlava October 30, 2011 at 8:43 AM    

    There was something wrong with that particular pipe. Anyway I've fixed it, it should be okay now.

    steve jobs November 4, 2011 at 1:13 PM    

    blogger sentral is very usefull for blogger like me thx

    DarkReif November 4, 2011 at 10:52 PM    

    Is there any way to get it to list more than 1000 posts? I love this code and have been using it for quite a while! Thanks!

    Greenlava November 5, 2011 at 8:49 AM    

    Your wish has been granted. It's 2000 now :)

    Rima November 9, 2011 at 1:16 AM    

    Assalamualaikum GreenLava,

    1) I have copied the code and have gotten that to work. Then I updated the URL builders to accommodate up to 2000 posts here: - and it stopped working.
    2) My main intention is to set up a static recipe page consisting of the same labels which can be found in the side bar; with all respective posts under each label. My first trial with the pipes was for 'biscuits' and that worked - but how do I add more labels? and split them up? Or do I have to create multiple separate pipes and link them to separate "fields" to paste the code. Can you please help? Thank you so much!

    Greenlava November 11, 2011 at 5:49 PM    

    Perhaps this TOC by Abu Farhan is what you need.

    Jungle Rebel November 17, 2011 at 5:19 AM    

    I love you :-) This is exactly what I've been searching for.

    Very interesting post. I like to share this post with my friends and book mark this interesting page. Keep it up.

    احمد عرفان شفقت December 11, 2011 at 6:50 PM    

    Oh...this is just the thing that I really needed.
    Many thanks.

    Computer Repair Tampa December 17, 2011 at 6:57 PM    

    Thanks for the post.

    Phaedra December 18, 2011 at 2:03 AM    

    Hi there, I came across this and found it fascinating. I have started a recipe blog and would like to create an index of recipes, grouped by label. I followed your initial instructions for adding the pipe and it worked beautifully. I also tried to follow Daniels instructions about adding the Label piece, and got totally lost. I was hoping you could assist.

    My blog:

    Ahmed Irfan Shafqat December 18, 2011 at 4:39 PM    

    Please here is a request: is it possible to show the posts in reverse chronolgical order, that is, the newest post appearing on top of the list and the oldest post at the bottom?

    I have gone through these comments to seek the answer and I have read comment #34 which gives the solution as: connect a direct pipe from the output of the Rename module to Pipe Output module, bypassing the split, filter, sort and union modules.

    I confess this is a very difficult solution for people like me.That comment is about 21 months old and I hope during this time you might have developed a possibilty of acquiring reverse chronological order through editing of the code.

    Please do let me know if it is possible to reverse the chronological order by making some changes in the code instead of tweaking the Pipes. I will be grateful for that.

    Greenlava December 19, 2011 at 7:47 AM    

    See reply #235

    Greenlava December 19, 2011 at 8:09 AM    

    @Ahmed Irfan Shafqat
    I've just made a separate pipe to list post titles reverse chronologically.
    This is the pipe ID: 33291f47872cc76e6594620a12791741
    All you have to do now is replace the original pipe ID (code line 22) with this ID.

    Ahmed Irfan Shafqat December 19, 2011 at 11:32 AM    

    Greenlava, you are an amazing person :) Thank you. I really wish to say thanks to you. I have just changed the ID and the desired result is right there. It's like magic. Your skills are awesome.And your generosity to share the wonderful fruit of your hard work with others is commendable indeed.

    Desh Raj Sonyok December 23, 2011 at 3:45 PM    

    thanks for making this wonderful widget...

    Anonymous,  December 30, 2011 at 5:49 AM    

    I wanna ask, can we make alphabet list using label?

    In order, i want to make a list by label, one by one in different post. i can find it

    Need little help here, noob blogger.

    Chad Rudnick, MD December 31, 2011 at 8:57 AM    

    How can I change the color of the post titles. It is defaulted as red on my blog.

    Greenlava December 31, 2011 at 10:24 AM    

    @Chad Rudnick, MD
    The link color inherits that of your template's.
    If you want to change your template's link color, go to Template Designer > Advanced > Links and select the colors in there.
    If you want to change the link color just for this widget, go to Template Designer > Advanced > Add CSS and enter this code:
    #HTML1 li a {color: #111199;}

    skysenshi January 2, 2012 at 8:44 PM    


    Mine was working perfectly yesterday, after I did some fixes (following the reverse chronology instructions found in the comments). But today it isn't working. I got this error when running the Pipe:

    This Pipe ran successfully but encountered some problems:

    warning Error fetching Read timed out

    (But it works in the debug mode, which I click "output". The results just don't reflect.)

    Greenlava January 3, 2012 at 11:13 AM    

    @Beatrice Margarita Venturanza Lapa
    The error is due to delay in fetching your blog feed. I've checked the feed URL -it is valid.
    Let's hope this is only a temporary glitch.

    sreejith January 15, 2012 at 8:03 PM    

    I want To List Post Titles By Label in sorted order
    I need Ordered list
    So i replace ul with ol
    But the sorting should be in a way such that what I am entering 1st should be at number 1..2nd at number 2 etc
    & these positions should not change unless i delete the posts

    For this what changes should i do ??

    Greenlava January 17, 2012 at 7:15 PM    

    Please read reply #224.

    aalunga January 28, 2012 at 5:59 PM    

    Nice.. Thank you!

    Fariha February 1, 2012 at 4:04 AM    

    hai, i have more than 2ooo post, how to edit the yahoo pipe so that all my post list appear?

    Greenlava February 3, 2012 at 12:50 AM    

    You want to read reply #68. And instead of adding modules with start-index=1001 and start-index=1501, you want to add start-index=2001 and start-index=2501 (to raise the limit to 3000 posts).

    James McGinley February 3, 2012 at 11:40 PM    

    Totally awesome. Thank you so much. Two huge questions please:
    1. This takes me most of the way there, BUT something LIKE the standard Blogspot Archive WITHOUT TRUNCATED TITLES would be IDEAL. Is this possible?
    2. For reasons of speed, IS IT POSSIBLE TO REDUCE FROM 2000 TO SAY, 500?

    Pls advise start_loving at yahoo dot com THANKS

    Greenlava February 6, 2012 at 6:59 PM    

    @Start Loving
    1. I don't think that is possible.
    2. You need to clone and edit the pipe. Remove the "URL builder" modules with start-index=501, 1001 and 1501. Keep only one URL builder module.

    Hans February 13, 2012 at 6:50 PM    

    THX!!!! Great code! Well written

    fowziey March 17, 2012 at 2:08 AM    


    TQVM Bro for the tutorial. First time I use Yahoo Pipe. It was great playing with it. Yesterday It solved an issue with Blogger JSON API related to number of feeds when creating my archive page and FYI, I cloned the pipe - Just another Malaysian blogger

    Unknown March 22, 2012 at 8:01 PM    

    Thanks so much for this. Is there anyway to make it so that it doesn't open a new tab when you click on the link?

    Greenlava March 23, 2012 at 5:10 PM    

    @duPont Manual
    Please read reply #134.

    Kristian March 29, 2012 at 12:34 AM    

    Hey Greenlava,

    did I understand this system correctly? If I want the single label posts to show, (comment n:o 9 Daniel) I have to make my own pipe on Yahoo?

    Greenlava March 29, 2012 at 8:03 PM    

    Yes that is correct. You have to clone the pipe and then edit it.

    RLindsey April 18, 2012 at 9:50 AM    

    AMAZING!!! Thanks!!

    Jen T April 26, 2012 at 12:35 PM    

    Your pipe ID in #243 worked beautifully!! My posts are now listed in reverse chronological order, just as you promised. Thank you so much for your amazing help Greenlava!!

    V Canada May 5, 2012 at 6:45 PM    

    how can I make the list without underlining? Or how do I remove link underlining pls?

    Or where do I put text-decoration:none?

    Greenlava May 6, 2012 at 12:03 AM    

    @V Canada
    Put it in line 11:
    '" target="_blank">'

    change it to:
    '" target="_blank" style="text-decoration:none">'

    Unknown June 1, 2012 at 1:31 AM    

    I look every for this...others had something similar, but this was the only one that worked for me! Thanks.

    bebjan June 13, 2012 at 2:39 AM    

    hey can you help me, i need to post content in alphabetical order but according to label how do i do that, i'm really confused with the yahoo pipes,

    Would really appreciate some help thankyou

    GreenLava June 16, 2012 at 8:28 PM    

    Read reply #224.

    Unknown June 25, 2012 at 7:33 AM    

    Thanks dude. Helped me out a lot!

    Jan July 15, 2012 at 9:43 AM    

    I am so excited! I followed your directions, read all your feedback to others for extra assistance, and figured it out! On my first full day with my blog index, I had 40 people use it, so I can see my "bounce rate" of people popping over from Pinterest and then leaving decline already! Just wanted to come back and thank you. Now, the only thing I have to figure out is I have 2 tabs now across the top: home and blog index. The background color on the blog index when it's not the tab being used, is dark gray, makng it hard to see the text, till the mouse hovers over it and then the background color changes to the pink I chose. Do you know how I can just make both tabs the solid pink all the time?
    Anyway, thanks so much!

    obengmin July 17, 2012 at 11:35 AM    

    thanks very much

    Jewel July 18, 2012 at 8:12 PM    

    Now I am using Yahoo Pipes in my archive page. Best wishes for you.

    Greenlava July 19, 2012 at 5:11 PM    

    @Tip Garden
    See the answer here

    DC,  July 28, 2012 at 6:36 PM    

    Thank you for this :)

    Unknown September 26, 2012 at 8:34 AM    

    can you do this say for just post that are recipes whe you have several other topics??

    Greenlava September 26, 2012 at 2:59 PM    

    @Meg Jones
    Please read reply #224.

    Coffee beans online November 6, 2012 at 4:09 PM    

    I have a doubt to get cleared. How does it list out the blog posts which start with numbers?

    Goddess Librarian November 7, 2012 at 4:57 AM    

    My alphabetical archive was working for quite a while, but I've noticed today that it is not. I haven't changed anything with the html. Is there a problem with the pipe (I haven't done anything with pipes).

    Greenlava November 7, 2012 at 4:07 PM    

    @Coffee beans online
    Please refer to 4) Customizing the list.

    उदयन पी.के. तुळजापूरकर
    एक भारतीय
    Udayan P.K. Tuljapurkar
    December 22, 2012 at 1:43 AM    

    Dear sir, very very thanks for this coding. this is very fast as compared to other lists. and moreover i can use in one blog (entries of other blog) also. can you please explain the coding of the ypipes. because i tried to change it but not able to do that. i like to have numbers in place of bullets. can you help me in that. once again thanks a lot.

    उदयन पी.के. तुळजापूरकर
    एक भारतीय
    Udayan P.K. Tuljapurkar
    December 22, 2012 at 1:45 AM    

    more over there i observed a new thing in this. i use it in place of post on my main blog (list of other blog's posts). but i find a gap in between. can you remove that or suggest me for that.

    Greenlava December 25, 2012 at 10:36 PM    

    @उदयन पी.के. तुळजापूरकर
    एक भारतीय
    I already explained how to enumerate under 4)Customizing the list.
    "i find a gap in between" -what is your blog URL?

    john,  January 20, 2013 at 6:20 PM    

    Your script can be changed to eliminate some words from posts titles? (for example if I have all my posts titles like this "Post about aaa", "Post about bbb", "Post about ccc" "Post about ddd", can they be changed into "aaa", "bbb", "ccc", "ddd"?) Thanks

    Greenlava January 20, 2013 at 11:43 PM    

    Sorry but it can't.

    Unknown February 23, 2013 at 1:58 AM    


    I need help with my feed. The pipe stopped working after one day, but now I can't get yahoo to read my feed.

    The feed works fine when I use it in Chrome or Firefox, but Yahoo Pipes won't read it. Please help!

    Oyon Boyon February 28, 2013 at 6:17 PM    

    It's working great! Thanks!

    Unknown March 31, 2013 at 12:35 AM    

    oui i really failed doing this why when i run pipe why its getting back to even i replace it :@

    Mail me Please pLease

    Benny Mathur April 13, 2013 at 12:07 AM    

    well can i make this for more than 1 blog plz tell how to make ....

    Josephine May 13, 2013 at 2:28 PM    


    Asthen Yukimori May 26, 2013 at 5:45 PM    

    hello, can i add the label categorize ?
    i successfully add the script, but i searching for label + alphabetical order, but really this is a great post, thanks.

    Mort June 13, 2013 at 6:54 AM    

    Is there a way that your display titles in order widget can be used on a private blog. It works fine when the blog is open but disappears when it's members only.

    Greenlava June 13, 2013 at 5:07 PM    

    This widget won't work on private blogs (they don't have RSS feed). And there's no workaround for that :)

    Arham Sukardi June 29, 2013 at 7:38 PM    

    Thanks for sharing this post, nice tips for beginner like me

    Unknown July 17, 2013 at 6:49 AM    

    For reverse order just change the for loop like this
    for (i = feed.count-1 ; i >=0 ; i--)

    very cheap auto insurance August 23, 2013 at 8:02 PM    

    Very informative post thanks for share this with us i highly appreciate you for this information thanks once again for sharing information like this Very informative post Thanks for sharing with you, I appreciate this information thank you again for sharing information like this.

    Inderjeet Singh September 3, 2013 at 12:27 AM    

    Greenlava thanx for the awseom post. I really like your post. I will try it on my blog in future.Thanx one's again

    ataur September 3, 2013 at 11:46 AM    

    Hello admin.
    Thanks for your helping post. Nice solution code. I will follow all the steps on my blog for develop.

    Best Regards,

    Welcome to Artista Hair September 6, 2013 at 8:44 PM    

    I do believe the way you produce feels as though having therefore much interest and you've set it in a way that everyone could understand. Should recognize the fantastic threads you've created here. Welcome to Artista Hair

    Unknown September 9, 2013 at 7:25 PM    

    Love your code, I had used it before for all articles but now I wanted to create static pages with list of articles per label (I've got some gardening blogs with a serious number of articles, got tired of adding them manually). I tried the instructions from comment #224 and it worked great for the first page.

    Then I tried to create other pages but alas... now the pages don't even show up. Can't we use the same widget more than once in Blogger?

    I've tried with using the original pipe, then made a copy of both pipes (all articles and per label) and it always works when there's only one, never when there are more than one of the widgets.

    I've tried in
    Pages: (created a new page to check if that makes a difference) (has vanished though I still see it in the pages modules) (has vanished too)

    Unknown September 20, 2013 at 6:12 PM    

    Would it be possible to make this work for content found through labels as well? I tried to change the code to add /search/label/x but it just didn't work. Haye vs Fury

    Greenlava September 24, 2013 at 12:17 PM    

    @rcs senthuran
    Please read comment #224.

    Anonymous,  December 4, 2013 at 4:42 PM    

    This is wonderful, thank you!

    Alícia F. R. December 23, 2013 at 11:56 PM    

    Very useful, thank you!

    «Oldest ‹Older 201 – 297 of 297 Newer› Newest»