September 1, 2006

Latest Posts display in sidebar

Do you miss the Previous posts section after migrating to Beta? As you might remember, classic Blogger used to show previous 10 posts in any page. When somebody visits your latest blog post following a link from another blog, he had a chance to look at the titles of previous posts and read them if he likes. Good news is that it is still possible with Beta to display upto 5 latest posts from your blog in your sidebar. Here's what you need to do.

Blogger Beta supports showing items from any feed as a page element. So, you could show the post titles from your blog's feed in your blog itself! The URL of your blog's feed is
http://yourblogname.blogspot.com/feeds/posts/full.
Goto your dashboard, Template->Page Elements and click "Add a Page element". Choose the Feed element and provide the URL that you collected in previous step. In "Configure feed" window, give an appropriate title (I gave "Latest Posts"). Save the changes and drag/drop your new element to wherever you want.

By the way, I am working on getting my pre-Beta hacks to work with Beta blogs. If you are new to my blog, you can expect a few more hack announcements in the coming days. If you would like to have a peek at my pre-Beta hacks, check out "Goodies to promote your blog" and "Related posts from your blog".

48 comments:

Max said...

The only problem I discovered with this method is that it lags behind the main page sometimes.

wande said...

You are doing a very great and wonderful job.

Please is there any way I can make the google adsense to appear at the bottom of every posts.

Thanks

I Buy Books said...

Woo hoo! My very first Blogger Beta hack. Easy instructions and it worked perfectly. I'll definitely be checking back often for more hacks. Thanks!

gentletouchee said...

does not work for me.Where is add page element in template?
i only see edit html,pick new,customize design and adsense.i'm using blogger beta.

Ramani said...

gentletouch,

you still seem to use classic template. click on customize design and choose a new template.then, you will see "Page elements" tab.

Paula M. Lawhon said...

The first help for Beta Blogger that really works! Thank you!
http://sfmediation.blogspot.com

gentletouchee said...

yes.thanks so much for your site!so much help! i am enjoying the 3 column templates!do you have any other ready made ones, aside from the 3 you posted.

again,your site is a great find.i wish you more success.

Ramani said...

gentletouch, I don't have any other prebuilt templates.

Mungo said...

Interesting - I got a huge js alert box telling me something was wrong once I changed the title of the widget from "Feed" or whatever to "Latest Posts", but once I logged out and in again, I found the elements had successfully be added to my template.

But interestingly, it picked up posts I had in draft mode, and not yet published.

Anyway, good hack.

Subliminal said...

How do I get the atom posts in beta so that I can do the other things that it says in this blog?

Ramani said...

Subliminal,

You don't have to find the feed URL anymore. It is derivable from your blog URL. I updated this post. Read it again and try it out.

Henry Bolingbroke said...

Thanks for that.

ojade said...

I have upgrade to beta. However, I use my previous template. Later, i found that the pervious posts section has bug on it. I can only see the most recent 10 posts only. The old blogger version can be view the pervious 10 posts when I click on a particular post. I have check my template scripts but found nothing wrong. Any comments.

Thanks

Ramani said...

ojade, i don't understand what's going on. report. to Blogger.

MSTK said...

I'm sorry if I'm doing this wrong, but the feed displays my newest posts in reverse order, with the oldest at the top and the newest at the bottom. Is there a way to change this?

Ramani said...

MSTK, I think it's because they are all posted on the same day. If you post on different days, latest will show before old ones.

Skanky Jane said...

Dear Ramani,

The skank again!

Great trick - thank you!

Two things:

1. When a reader selects one of the "latest posts" (for me this is called "Out of the Box") it is no longer a collapsible/expandable post - is it possible to make it such?

2. I have a long sentence in this post (an url) and it doesn't seem to be contained within the main body element (Using your hacked 3 col Minima Blogger clone) and trails right across the right sidebar elements in a most illegible and unattractive manner.

This occure on the actual blog page aslo only when the post is accessed through my Out of the Box widget the long sentence appears slightly lower on the page so that it actually bumps into things.

Is there a way to fix this or do I just have to make sure I keep my sentences short?

Thanks for your time, (and the ruse!)

SJ xx

Ramani said...

SJ,

Expand/collapse is only for the main page, not for post pages. The idea is that when the reader is in a page with only one post, he wouldn't want to click "read more" to read the post.

If you have a long URL without any spaces, this is the behaviour in all the templates. I don't know how to make it wrap around. Instead, you could use the URL as the hyperlink for a smaller text.

Skanky Jane said...

Doh!

Thank you Ramani.

SJ xx

Nefuis said...

Thanks Ramani
this is cool and it works perfectly, btw, is there any way that it can display more than 5 previous posts?

Ramani said...

Nefius,

Unfortunately no. Blogger only allows upto 5. But you can use a third party RSS to Javascript service (such as www.rss-to-javascript.com) to show more.

delang said...

hi ramani. i've a little prob. latest post doesnt show very well. the post with title 'winamp tricks:...' doesnt show up. hope u have resolution on it

Nefuis said...

OH ...
thanks for your help

Skanky Jane said...

Dear Ramani,

I am really liking this hack - it's terrific in fact!


One thing I notice however is that if I delete a post it still shows up in the recent posts list and there seems to be no way to delete from the page element box.

Any ideas?

SJ xx

Ramani said...

Shanky,

I think deleted posts don't get deleted from the feed. See if it gets updated atleast after some time. Otherwise, I don't know how to avoid this.

Skanky Jane said...

Ok, Thanks Ramani.

SJ xx

gentletouchee said...

i'm having some major probs with this hack..

i can see on the latest posts that i have the same post, posted 5 times in the latest posts.with no other posts listed except for that one post listed as latest posts 5 times.

is there a way out of this "sticky" condition??pls. help! thanks

Ramani said...

gentle touchee, that's really wierd. NO clue what's happening there.

After Prozac said...

Ramani, thanks a lot for this hack. It worked great the first time I tried it.

Monique said...

Hello, I just added my first blog using Blogger Beta last week. I would like to add my labels to the sidebar but do not see the "Page Elements" tab. When I am at the "Template" area I have these options to choose from:
Edit HTML, Pick New, Adsense

I do not have any other options. The template I am using is the Tic Tac Blue Template from Blogger.

Any ideas?

Ramani said...

Monique, I think you are still using classic template. You have to pick a Layout template, maybe using "Pick new"

Maziar said...

I wonder if I can use chicklets to social sites in bottom of each post, only shows the icon of them with no text. Is there any automatic creator to do such?

Http://raizaM.BlogSpot.com

Ramani said...

Maziar,

Check out this hack which does something similar to what you are asking.

http://beautifulbeta.blogspot.com/2006/09/social-bookmarking-revisited.html

cammu said...

Cool!
Thank's
:)

Vincent said...

hi! A great simple hack (the kind that makes you go 'why didn't I think of that!' -which makes it even better). Have a question for you, is there a way to adjust the font size of the feed? As titles are usually a bit longer, and I have the 'latest posts' in my side bar which isn't too wide, I would like to see if it's possible by editing the template to adjust the font size just for this widget. Any ideas? My blog is at http://metoopointo.blogspot.com and I have the feed widget up as a 'Latest Posts' widget. Thanks!

Ramani said...

Vincent, you have edit the template code itself to do this. Blogger doesn't offer a GUI option to adjust font size.

Shrish said...

hi Ramani, thanks for the tip. I have set the blog feed to short summary instead of full, therefore I have to change the url above to be - http://yourblogname.blogspot.com/feeds/posts/default.

Now I feel that Posts in sidebar update slowly. Do you think that it is due to the changed feed URL ?

Ramani said...

Shrish, change in url shouldn't matter. This might be a temporary issue.

aarani said...

ur topic on adding the latest posts in side bar is amazing....

given easy instructions, which worked out well... thank u....

followed the same instructions for adding read more link as define in ur post, but couldn't worked well... will u pl. help me

calimania said...

It is a great tip. exactly what I was looking for.

Shan said...

Found your site and it appears to be a great resource. I'm having a problem with showing "latest posts" in the sidebar. I'm new to this, and don't really understand manipulating code that much. I'm using Blogger Beta, and a template from the standard list (Minima Dark). I want to show my most recent posts in a side bar, and I can't make it work consistently.

I've tried two different methods:

1. What you suggested, adding a page element (Feed) and putting my own info there. It shows some previous posts, but not the most recent. And when I've added a new post as a test, it shows up on the blog, but not in the sidebar page element for the most recent posts. (And while if this worked, it would be nice, I'd like to show more than just 5).

2. Adding a page element (html / java script) with an RSS to javascript converter (such as http://itde.vccs.edu/rss2js/build.php), with my info. This will work, once I paste it it. But again, once I add new posts to my blog, they don't show up in the sidebar, and then after a day or so, ALL the previous posts listed just "vanish."

I've got all my Site Feed settings set to "full" and I can't for the life of me figure out what keeps happening.

Can you offer any advice or help to a newbie blogger? Thanks!

Ramani said...

Shan,

When I checked your blog, it seems to be working fine now. is that right? Blogger's feed widget is not all that good.

Aditya said...

@Shan: Your feed will show the posts sorted by last updated, not published. It's not a random bunch of posts showing up :P

You can always use an external feed aggregator like 'feedjumbler', and then use that address in your widget. Feedjumbler doesn't reorder your items, it is always sorted by published date/time.

diddy47 said...

hi, thanx for the info...is there anything i can du to make a list of all my posts display on the side bar like how they appear in yours for Post withe labels... i like the Oder, newer function where you can navigate back on fourth in the side without leaving the page yest see a full list of all the posts...i'd like to have that please

Ramani said...

Diddy,

It's available as part of neo template which is free. More details here.

http://hackosphere.blogspot.com/2007/05/installing-neo-template-in-your-blog.html

diddy47 said...

hi...i have just put up the latest posts hack on my blog...but t seems bloger is NOT updating the list when i write new posts. when I delete a posts it still shows...even whn i change the name of the post...th old name still shows. When I deleted the page element it ony disappeared on the page I was on. On the other pages it was still there, when i tried to delete these...I got an error message...Is there something from with my CSS/HTML code or is a prblem with the blogger site?

Ramani said...

This seems like a blogger issue. Try refreshing the pages after some time.

Scholarship Admin said...

How do I display popular post on the blog? Thx