Wednesday, 20 June, 2007

Add a Recent Posts List after Every Post.

Add a Recent Posts List after Every Post.

Add a Recent Posts List after every post in your blog so that any reader reading a single post can see at the end of the post this list and then if interested may go there..........

To put a Recent Posts List in the sidebar see List Previous Posts.
To do this we will use your blog's feed to put a list of recent posts at the bottom of every post. First we will have to turn on the blog feed. For this go to Settings----->Site Feed---->Blog Posts Feed----->Set this to Short by clicking on the drop-down arrow then----->Save Settings. By setting this to short only a short section of your posts will be delivered to the reader who then hopefully will be intrigued enough to visit your blog to read the rest of the post. For our purpose we need only the titles of the posts so this also serves our interests. Then we need the URL of the feed. For beta blogs the RSS feed URL is :

Substitute actual name of your blog instead of 'yourblogname' above.

Now head over to an online RSS-to-Javascript converter. There is one located at :

Type or paste your RSS blog feed url in the text box provided. See picture below. Click on image to enlarge it.

Fill in the other options. We do not want a title so set Show Channel as No. Enter the number of items to display. Set Show Item descriptions to 0 as we want only the titles to be displayed. Set Show item posting date to No. and Set Open links in a new window to Yes as we do not want the original post page to be closed or covered by new content. Click on Preview to check that the feed is being generated properly and then click Generate Javascript. Javascript code is generated along with code for browsers not supporting Javascript. Copy the whole code. This is Step 2.

Login to your dashboard of Beta Blogger and click on Layouts of the blog whose feed you had taken in the first step. The Page Elements window opens. .

Then scroll down in Edit Template text box till you come to :

div class='column' id='main-wrapper'
b:section class='main' id='main'

In the second line add : maxwidgets='4' showaddelement='yes' so that it reads like this :

b:section class='main' id='main' maxwidgets='3' showaddelement='yes'

Then Save Template. This change will enable you to add extra Page Elements/Widgets to the main column.

Now click on Page Elements tab and then click on the new Add Page Element link in the Blog Posts column. Choose Html/Javascript option in the new window which opens and paste the Javascript code from Step 2 here. Type 'RECENT POSTS' in the title field. Save changes. Back in Page Elements view you will see a new element added on top of your Blog Posts. Click and drag it to below your Blog Posts in the same column. This will place it below your Blog Posts and it will appear below each post in individual post view. See how I have added it below.

No comments:

Enter your email address:

Delivered by FeedBurner