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.
The list comes with several options:
- List them inside a widget or in a
poststatic page. - 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.
- Append (or not) a comment count at the end of each title.
- 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(pList); document.write(pComment); //to remove comment count delete this line document.write('</a></li>'); } document.write('</ul>'); } </script> <script src="http://pipes.yahoo.com/pipes/pipe.run? YourBlogUrl=http://www.bloggersentral.com &Order=alphabet &_id=401e43055731c1a29f1e1d3eb5e8e13f &_callback=getYpipeTL &_render=json" type="text/javascript"></script> <span style="font-size: 80%; float:right;">Get this <a href="http://www.bloggersentral.com/2009/12/list-post-titles-in-alphabetical-order.html" 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.)
- Create a new page by going to Posting > Edit Pages and clicking the New Page button.
- Click Edit HTML tab to switch to HTML mode.
- Copy and paste the code into the editor.
- Click Post Options at the bottom of the editor. Under the Edit HTML Settings heading, select Ignore newlines.
- Publish and view your post . The list should appear inside the page.
- 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.
- 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.
- Go to Design > Page Elements.
- Click Add A Gadget link.
- Select HTML/Javascript gadget.
- Enter the title of your widget e.g. All Posts List.
- Copy and paste the code inside the content box.
Replace http://www.bloggersentral.com (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. - 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 tochrono
. - 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) withol
. - 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:
- Go to the Yahoo! pipe.
- Log in to your Yahoo! account.
- Create a clone by clicking the Clone button.
- Click edit source to edit it in anyway you like.
- When you’re done editing and saving, test run it by clicking Run Pipe button to confirm the output of the pipe.
- 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.)
Enjoy!
Updates:
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»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?
http://www.comicbookandmoviereviews.com/
@The Reviewer
I've answered similar question before. Please read reply #9.
Thank You Greenlava... Awesome Widget
www.kaytoy.blogspot.com
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.
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:
http://kontra-cinema.blogspot.com/p/blog-page_6359.html
@nikos
I see you've got it fixed. It looks fine :)
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!
Thanks for cool widget.
how to insert date ? the suggestion you gave in comment#31 is not working. can you pls tell me
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?
@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.
@Billy
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 :)
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. :-)
@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).
Great Stuff man! Thanks!
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
http://sengfletcherfamilycookbook.blogspot.com/
@Michael F
I've cloned the pipe and made the needed changes. Here's the URL:
http://pipes.yahoo.com/pipes/pipe.info?_id=0943a5e725f699042988908ac3ca5420
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 (http://sengfletcherfamilycookbook.blogspot.com)
you should now enter the label feed URL:
http://sengfletcherfamilycookbook.blogspot.com/feeds/posts/summary/-/label
Replace the word "label" with your label. Remember, labels are case sensitive.
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:
&Order=alphabet
&_id=401e43055731c1a29f1e1d3eb5e8e13f
with this:
&Labelfilter1=criticalthinkingworksheets
&_id=768db86adb524aa4b02586298d339ac2
Did I do something wrong? Thank you for your help.
@boo
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.
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?
http://criticalthinkingworksheet.blogspot.com/
It's the first widget on the right side bar named "testing"
Thank you so much
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
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.
@boo
There was something wrong with that particular pipe. Anyway I've fixed it, it should be okay now.
blogger sentral is very usefull for blogger like me thx
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!
@DarkReif
Your wish has been granted. It's 2000 now :)
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: http://pipes.yahoo.com/pipes/pipe.edit?_id=224d7abc2205bb638df0a4c5b3249003 - 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!
@Rima
Perhaps this TOC by Abu Farhan is what you need.
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.
Oh...this is just the thing that I really needed.
Many thanks.
Thanks for the post.
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: http://www.recipesbyphaedra.com
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.
@Phaedra
See reply #235
@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.
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.
thanks for making this wonderful widget...
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.
How can I change the color of the post titles. It is defaulted as red on my blog.
@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;}
Hi,
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 http://www.skysenshi.com/feeds/posts/summary?max-results=800&redirect=false: Read timed out
(But it works in the debug mode, which I click "output". The results just don't reflect.)
@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.
Hi..
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 ??
@sreejith
Please read reply #224.
Nice.. Thank you!
hai, i have more than 2ooo post, how to edit the yahoo pipe so that all my post list appear?
@Fariha
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).
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
@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.
THX!!!! Great code! Well written
Salam,
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
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?
@duPont Manual
Please read reply #134.
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?
@Kristian
Yes that is correct. You have to clone the pipe and then edit it.
AMAZING!!! Thanks!!
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!!
how can I make the list without underlining? Or how do I remove link underlining pls?
Or where do I put text-decoration:none?
@V Canada
Put it in line 11:
'" target="_blank">'
change it to:
'" target="_blank" style="text-decoration:none">'
I look every for this...others had something similar, but this was the only one that worked for me! Thanks.
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
@bebjan
Read reply #224.
Thanks dude. Helped me out a lot!
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!
thanks very much
Now I am using Yahoo Pipes in my archive page. Best wishes for you.
@Tip Garden
See the answer here
Thank you for this :)
can you do this say for just post that are recipes whe you have several other topics??
@Meg Jones
Please read reply #224.
I have a doubt to get cleared. How does it list out the blog posts which start with numbers?
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).
http://goddesslibrarian.blogspot.com/p/alphabetical-archive.html
@Coffee beans online
Please refer to 4) Customizing the list.
एक भारतीय
Udayan P.K. Tuljapurkar
Indian, 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
Indian, 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.
@उदयन पी.के. तुळजापूरकर
एक भारतीय
I already explained how to enumerate under 4)Customizing the list.
"i find a gap in between" -what is your blog URL?
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
@john
Sorry but it can't.
Hello,
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!
It's working great! Thanks!
oui i really failed doing this why when i run pipe why its getting back to http://www.bloggersentral.com even i replace it :@
Mail me Please pLease tenshitachebana@gmail.com
well can i make this for more than 1 blog plz tell how to make ....
YOU ARE MY SALVATION.
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.
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.
Thanks
@Mort
This widget won't work on private blogs (they don't have RSS feed). And there's no workaround for that :)
Thanks for sharing this post, nice tips for beginner like me
For reverse order just change the for loop like this
for (i = feed.count-1 ; i >=0 ; i--)
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.
Greenlava thanx for the awseom post. I really like your post. I will try it on my blog in future.Thanx one's again
Hello admin.
Thanks for your helping post. Nice solution code. I will follow all the steps on my blog for develop.
Best Regards,
ataur
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
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
Blog: http://creersonpropreblog.blogspot.com
Pages:
http://creersonpropreblog.blogspot.be/p/bloggerr.html (created a new page to check if that makes a difference)
http://creersonpropreblog.blogspot.be/p/blogger.html (has vanished though I still see it in the pages modules)
http://creersonpropreblog.blogspot.be/p/trafic.html (has vanished too)
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
@rcs senthuran
Please read comment #224.
This is wonderful, thank you!
Very useful, thank you!
Comments on this post are closed.