Flag This Hub

Blogger Blogspot Blog: How to Add a Related Post widget

By


The Best Related Post Widget for Blogger Blogspot Blog

As a blogger using blogspot platform, you will do enything to make your blogger blog popular and loved by many people. When a reader is visiting your blog and reading your blog posts, you will want to make the reader feels convenient with your blog appearance and blog posts. Beside posting articles that are valuable to your readers, you will also need to help your readers how to easily find your valuable blog posts.

One way to do this is to install related post widget. Related post will appear underneath each of your current full post showing all related posts to the post that they are currently reading. So if you have many posts within the same category, chances are very high for your readers to read some of those related posts. Remember that there is no other way in Blogger to find related posts, apart from clicking category having some posts. It is not so wise to let your readers do this, just to find what other posts are maybe related. It is better to show them directly all other related posts under the current post they are reading. That is why there is a related post widget.

Here you will see a code of the best related widget available around and steps how to install it in Blogger blogspot blogs. First, have a look the image below how this related post widget looks like. This image is taken from a post of a blog implementing this related post widget.

Related Post Widget
Related Post Widget

Code1

<style> #related-posts { float : left; width : 540px; margin-top:20px; margin-left : 5px; margin-bottom:20px; font : 11px Verdana; margin-bottom:10px; } #related-posts .widget { list-style-type : none; margin : 5px 0 5px 0; padding : 0; } #related-posts .widget h2, #related-posts h2 { font-size : 20px; font-weight : normal; margin : 5px 7px 0; padding : 0 0 5px; } #related-posts a { text-decoration : none; } #related-posts a:hover { text-decoration : none; } #related-posts ul { border : medium none; margin : 10px; padding : 0; } #related-posts ul li { display : block; background : url("http://lh3.ggpht.com/_cNpXRtRph18/S76dASm3WGI/AAAAAAAAEJg/AVmw4HhRdsk/rss.png") no-repeat 0 0; margin : 0; padding-top : 0; padding-right : 0; padding-bottom : 1px; padding-left : 21px; margin-bottom : 5px; line-height : 2em; border-bottom:1px dotted #cccccc; } </style> <script src='http://theblogtemplates.com/scripts/Related_posts_hack.js' type='text/javascript'/>

How to Install Related Post Widget

Follow these steps:

  1. Log in to your dashboard
  2. Select Design and HTML
  3. Back up your template by clicking Download Full Template (in case something funny happens or you change your mind)
  4. Select the box next to Expand Widget Template
  5. Search for </head> code
  6. Place the following Code1 shown on the right just underneath the </head> code in your template
  7. Search for any of these code present in your template: <data:post.body/> or <div class='post-body> or<data:post.body/>
  8. Add the following Code2 beneath whichever the code in #7 you find
  9. Save you template. Preview the related post in action by selecting one post in a category or label having other posts

Code2

<b:if cond='data:blog.pageType == "item"'> <div id="related-posts"> <font face='Arial' size='3'><b>Related Posts : </b></font><font color='#FFFFFF'><b:loop values='data:post.labels' var='label'><data:label.name/><b:if cond='data:label.isLast != &quot;true&quot;'>,</b:if><b:if cond='data:blog.pageType == &quot;item&quot;'> <script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=5&quot;' type='text/javascript'/></b:if></b:loop> </font> <script type='text/javascript'> removeRelatedDuplicates(); printRelatedLabels(); </script> </div></b:if>

Comments

Reynold Jay 13 months ago

Thaks for all the great tips. I'm now fully prepared to Blog as never before! I enjoyed this very much. You have this laid out beautifully and it is easy to understand. Keep up the great HUBS. Up one and Useful. Hey! I'm now your fan! RJ

Sincler 13 months ago

Thanks for great plugin

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working