Show related Posts in Blogger

Its essential tactic to show related Posts in Blogger , to improve usage statics and page views . If a definite number of related articles are shown at the bottom of each posts,there is chance for the reader to click on those links and head over to the next page . Related posts widget on Blogger depends on how you name your post labels .


Here’s how you can do that ,
1. Open your Blogger template’s Layout and select Edit HTML .
2. Download full template for future use .
3. Click on expand widgets templates.
4. Press Cntrl+F and search for tag and insert the following script above that line .
Download
5. Similar to step 4 , find out section .<p><data:post.body/></p> . Anything you post under this line would appear at end of each posts.
6. Now paste the following code below that line .
Download
7. Save your template

Now if everything went fine , your post pages would show related articles depending on the applied label.You can customize the color and font size of the widget by editing the bold elements in the CSS code(download 1).

#related-posts .widget h2, #related-posts h2 {
color : #333333;
font-size : 13px;
font-weight : normal;
margin : 5px 7px 0;
padding : 0 0 5px;
}

The default number of related posts are 5 as set on the code . You change it by editing max-results=5 in the JavaScript ( download 2) code to a suitable value .

Credits: Rias

This entry was posted in Uncategorized by . Bookmark the permalink.

9 thoughts on “Show related Posts in Blogger

  1. Thanks for the guide, the scripts is working fine, I’m just having a little trouble. The script is ignoring the value I set on max-results at all. It always shows as many posts as it may find, and I guess I have used the correct syntax. Any hints?

  2. hey stupid.. where to paste the first code man.. mentin that clearly. just find for tag means.. what tag?

  3. DArt for max-results
    chage this line (first script)
    while (i < relatedTitles.length && i < 20) {
    and
    max-results=5 (second script)

    with your value

  4. Forbidden

    You don’t have permission to access /files/2008/7/6/1991483/related_posts_in_Blogger.txt on this server.

Leave a Reply

Your email address will not be published. Required fields are marked *