skip to main | skip to sidebar

Smarter Related Posts Widget for Blogger
A new edition of my jQuery plugin -Related Posts widget for Google Blogger- that is loaded with pretty new features like posts thumbnails and transition effects..

Displaying related posts is a smart way for keeping your site visitors around and with thumbnails it is even smarter!

Check out this easy setup wizard for demos and code generation. Also, to have code copied to your Blogger blog!


Easy Setup Wizard!

Few Notes

  • Code consists of 2 important parts
    1. Including CSS and Javascript files (jQuery library & widget in that order). Each file only needs to exists one time on a page regardless of how many widgets you have on that page. You can include the Javascript files at <head> section or by the end of the page.
    2. Placing the container DIV where you want widget to appear, setting class attribute as "related-posts-widget" to have widget automatically loaded! And setting widget options either in an inner HTML comment or in a HTML5 attribute 'data-options'.
    3. Although previous parts are all you need, You can still call widget at document-ready on a HTML element identified by some selector and pass options in the method call.
  • Plugin was also tested to work with jQuery v1.3.2 and v1.2.6, Just replace jQuery Javascript source to "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"
    Or "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js"
  • Post thumbnail is usually the first image you insert in the post and it is automatically extracted by Google Blogger and that image must be uploaded to PicsaWeb - directly or through Blogger post editor.

New Features

  1. Display related posts with/without thumbnails.
  2. Since, images added to Blogger posts are uploaded to PicasaWeb, you can use many custom thumbnail sizes.
  3. You can use one of 2 CSS styles to help you get started quickly.
  4. Display posts with transition effects or as a fixed list.
  5. Many transition options are available like opacity, width, height, font-size.
  6. Optional timeout technique is used to finish widget loading when one or more feed requests were not completed successfully, instead of waiting indefinitely.
  7. Thumbnails loading is delayed until widget has finished aggregating related posts to avoid loading extra images
  8. You can customize it by placing optional parameters -like custom animation- in a HTML comment or HTML5 data attribute.
  9. You can disable widget if current page is not a post page.
  10. Widget was rewritten as a jQuery plugin, use a typical jQuery call to load it or auto-load any number of div elements with "related-posts-widget" class in the same page.

Old Features

As in version 1.0, this widget..
  1. Is easier. No need to edit your Blogger template.
  2. Is smarter. Posts are aggregated and sorted according to post tags that are already displayed in post page.
  3. Is optimal. It queries summary feeds of your blog instead of querying default feeds that return full contents.
  4. Can work as recent posts widget too.
  5. Can work with fixed list of tags instead of using current post tags.

73 comments

  1. Swashata // September 17, 2010 6:09:00 PM GMT  

    Simply awesome :) If you have time, then can some of your tutorial can you please explain, how you achieve the transition effects? Looking at the source code, I found that you almost do it like faking an animation effect from opacity 1 to opacity 1. It would be really nice to read from your tutorial.

  2. Mike // September 17, 2010 8:42:00 PM GMT  

    @Swashata,
    Thanks my friend.
    Explaining the effects is on my mind :) Hope I will have the time to do it..

  3. Asker // September 18, 2010 1:08:00 PM GMT  

    Great work Mike.
    really good :)

  4. Mike // September 18, 2010 1:29:00 PM GMT  

    @Asker,
    Thanks my friend :)

  5. Beben // September 20, 2010 8:16:00 PM GMT  

    hmmmm...its a full stylish
    amazing...
    thanks a lot for your creativity :)

  6. Swashata // September 24, 2010 4:12:00 PM GMT  

    @Mike
    Great! Would be waiting for that :)

  7. erwan // November 5, 2010 3:24:00 PM GMT  

    great....
    i like it.... :)

    thanks...

  8. security // November 8, 2010 7:33:00 AM GMT  

    thanks good widget

  9. Anthony Souls // November 10, 2010 1:47:00 PM GMT  

    Seemed really cool, although not for me- Seems the related posts are always the same ones. There's no variety too when I included it within each post.

  10. Mike // November 10, 2010 10:58:00 PM GMT  

    @Anthony,
    Can you give a sample url of the issue..?

  11. nishad // December 8, 2010 10:53:00 PM GMT  

    wow. thx for such a great tool

  12. SeerSucker // March 26, 2011 11:40:00 PM GMT  

    cannot make it work:(

  13. Mike // March 28, 2011 1:13:00 PM GMT  

    @SeerSucker,
    Send me details about the issue..

  14. gabanMorka // April 11, 2011 2:34:00 PM GMT  

    how to apply the containerselector on this new widget?
    i want it to be placed under my content, but above the comments

  15. Mike // April 12, 2011 10:03:00 AM GMT  

    @gabanMorka,
    You don't need that, you can just add the code to HTML widget under the post content..
    If you still need to show the widget in some specific container, go to setup page and choose "jquery" in "widget loading" option from the left panel and see how the generated code uses an ID as the container selector..
    If you need further assistance, email me

  16. Christio // April 14, 2011 8:58:00 AM GMT  

    Great tool, but how to remove the post when being read, include showing at related post. Please help me, thx

  17. Mike // April 14, 2011 9:24:00 PM GMT  

    @Christio,
    I'm not sure what you need, can you email more details about the issue and URL of the blog?

  18. Chetan // May 4, 2011 11:16:00 AM GMT  

    Hi, I used this widget but its showing me only titles of my blog but i want to show the some part(text part)of blogs also. so can you please suggest me how can i do this?

  19. Mike // May 4, 2011 10:32:00 PM GMT  

    @Chetan,
    Can you explain your issue again, or email me for more details.. also, let me see a sample link..

  20. Chetan // May 5, 2011 5:01:00 AM GMT  

    I am using this widget in my website which is not uploaded yet. by using this widget i can see my blogs in my website but its showing me only image & title of my blogs but i want to show blog text also on my website. please give me some suggestion.

    Thanks in advance......

  21. CP // May 14, 2011 12:34:00 PM GMT  

    Great plugin Mike !
    But I have a problem using the "Post Pages Only?" option. On my stand-alone page the widget appears showing "loading.." inside it.
    You can se an example of this at http://selogeek.blogspot.com.

  22. Mike // May 14, 2011 12:51:00 PM GMT  

    Good point @CP,
    You need to remove the "loading.." text inside HTML code of the widget..

  23. CP // May 15, 2011 1:25:00 PM GMT  

    Thanks for your help Mike, did as you said and it's better. I still have the empty widget border though.

  24. Mike // May 15, 2011 7:20:00 PM GMT  

    You welcome @CP,
    try doing few CSS changes on some div classes like [".main-inner .widget",".widget-content"]. try something like setting vertical padding to 0 in order to hide it when it is empty..

  25. Mike // May 16, 2011 8:50:00 AM GMT  

    @Chetan,
    Sorry that plugin doesn't display posts summaries.. maybe on next version..

  26. Aaronreaction // June 26, 2011 7:51:00 PM GMT  

    ive tried a few of these things now and this is just another one that fails to work. i got the widget saying 'loading' and thats about it

  27. Mike // June 26, 2011 8:37:00 PM GMT  

    @Aaronreaction,
    email me sample url and more details so I could help you.

  28. Anonymous // August 4, 2011 6:32:00 PM GMT  

    I do not have any problem in application of this HTML script.i am running 3 blog and i applied this for all my blog.and works perfectly.i just need to know that i want to Show posts from my another blog(i.e) my 1-st blog post should appear in 2-nd blogs related post ! is it possible pls replay soon !!

  29. Mike // August 4, 2011 7:05:00 PM GMT  

    @Anonymous,
    you can set plugin option "blog_url" to any Blogger blog address. But to get related posts from another blog, the 2 blogs should have common tags/labels. (In blogger, tags are case-sensitive!)

  30. Haz Issac // August 6, 2011 11:22:00 AM GMT  

    hello mike.. this is a really full stylish widget for related post i ever seen.. good work! n i already install this widget to my blog.. but the prob is, the related post only show the same related post.. not change to another related post by label.. can u help me how can i fix this? i want the related post automatic change to another related post by label.. not the same related post.. u can see at my blog http://hazissac.blogspot.com/

  31. Haz Issac // August 6, 2011 11:55:00 AM GMT  

    and 1 more.. when i add this /1.4.2/jquery.min.js script, my multilevel menu, recent post and recent comment tab is not working.. i using the new one,1.6.2/jquery.min.js script.. when i removed the 1.4.2 jquery min js code, the multilevel, recent post n comment tab is working.. but when i add the code back, its currently not working..

  32. Mike // August 6, 2011 12:07:00 PM GMT  

    @Haz,
    I check your blog and the plugin looks working fine.. If you have 2 specific posts with different labels and are showing the same related posts then please send me links to my email..

    You should use one jQuery only on a page! Use latest version of jQuery that supports all the plugins you are using..

  33. Haz Issac // August 6, 2011 12:19:00 PM GMT  

    mike, ok now u see at my blog.. i already removed the code 1.4.2 jquery and i use the 1.6.2 only, and its not show anything related post..

  34. Mike // August 6, 2011 1:20:00 PM GMT  

    @Haz,
    Have you tried to use jquery 1.3.2
    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'></script>

  35. Haz Issac // August 6, 2011 2:10:00 PM GMT  

    yes, its working with ur code now.. but as a same prob, my multilevel menu and tab post n comment not working when i removed the 1.6.2 script.. so, which script i should do? when i use the 1.6.2, all multilevel, recent post n comment, carousel working good.. but when i add this related widget, above /body i should add this script for make this related post working
    1.4.2/jquery.min.js and jquery.related-posts-widget-2.0.min.js ..

    when i add 1.4.2 jquery, my multilevel n all not working but the related post working good! so, which code i should removed n use?

  36. Mike // August 7, 2011 6:12:00 PM GMT  

    @Haz,
    I did a little change in the plugin to make it run with jquery 1.2.6
    You don't need to change anything, the plugin is actually working on your blog now :)

  37. Haz Issac // August 7, 2011 8:11:00 PM GMT  

    well mike.. the related post working good but the same issue, 1.6.2 jquery not working.. i dunno whats the problem.. u can see at my blog.. its like something wrong to my template.. http://hazissac.blogspot.com/ .. i follow the tutorial from this site simplebloggertutorial.com.. plz check if the step right or not.. but at the site, the related post widget working good .. so, i dunno what to say boss..

  38. Mike // August 7, 2011 9:06:00 PM GMT  

    @Haz,
    please contact on my email as this is out-of-scope for this post..

  39. DILIP VAMANAN // August 15, 2011 5:30:00 AM GMT  

    I have tried to integrate to nmarketers.com. I have added the scripts in head and related post div just after post.body.

    But it is getting stuck at Loading.. I can't see any related posts. Am I missing something?

  40. Mike // August 15, 2011 12:14:00 PM GMT  

    Hi Dilip,
    I replied to your email about that issue. Anyway, the problem was having more than one jQuery plugin included in the page..

  41. DILIP VAMANAN // August 19, 2011 7:02:00 AM GMT  

    Hello Mike,

    Thanks, I guess your mail might have gone to spam filter :(. Yes there is already a jQuery in the page. So in this case, what can be done ?. How can I make the related posts plugin active ?

    Dilip Vamanan

  42. Mike // August 19, 2011 12:42:00 PM GMT  

    @Dilip,
    you are including 4 jquery versions on your page, which is no good..

    you should use 1 version only, I suggest using the latest one 1.4.2, if some plugin didn't work with 1.4.2 then use 1.3.2 or 1.2.6

    order of including jQuery plugins and related CSS in any page should be like this:
    1) Related CSS files
    2) jQuery library
    3) any jquery plugins

  43. Leadership Team // August 19, 2011 2:58:00 PM GMT  

    Hello Mike,

    Thats right, I was using jQuery in another plugin. Now to just verify I have removed that. In the HTML source, there is only one jQuery version include.

    But still no related posts ;(

    site name : nmarketers.com or in any other page.

  44. Mike // August 19, 2011 3:10:00 PM GMT  

    @Leadership,
    but the jQuery plugin itself is not included :
    <script type="text/javascript" src="http://blogger-related-posts.googlecode.com/files/jquery.related-posts-widget-2.0.min.js"></script>

  45. cayun // August 28, 2011 3:25:00 AM GMT  

    it's great, thanks

  46. Sandipan // September 7, 2011 7:25:00 AM GMT  

    Excellent Work. This works very well. Thank You so much.

  47. JN // November 4, 2011 4:29:00 PM GMT  

    Simply the best around. I have a 5 years old blog and the widget crawls like a charm.

  48. RoadTested // November 4, 2011 8:39:00 PM GMT  

    Help! Perhaps I'm doing something wrong... Instead of "Related Posts" I'm getting "Recent Posts." I made sure to mark "Related Posts" in the setup (fixed tag/label), and I'm still only getting "Recent Posts." Also, I'm not getting thumbnails, just links (titles). Thanks in advance. :-)

  49. Mike // November 4, 2011 8:56:00 PM GMT  

    @RoadTested,
    Does the page includes post labels?
    Can you send me your link to check it out..

  50. Galatema // November 21, 2011 12:25:00 PM GMT  

    vertical appearance on my blog, how to display horizontally??
    Thank you Mike

  51. Mike // November 21, 2011 10:44:00 PM GMT  

    @Galatema,
    1) include CSS file at the start of widget code..
    <link type="text/css" href="http://blogger-related-posts.googlecode.com/svn/v2/style1.css" rel="stylesheet" />

    2) set option "title" to 0 to hide post title..
    ,titles:0

    try this.. for further help please email me.

  52. tcokli // November 22, 2011 9:25:00 AM GMT  

    Great wiget, thanks!
    But I have a same problem as Galatema: they displays vertically )

    You recomendations does not work...

  53. Mike // November 22, 2011 10:18:00 AM GMT  

    @tcokli,
    can I have the url?

  54. tcokli // November 22, 2011 10:27:00 AM GMT  

    Sure
    http://tcokli.blogspot.com/

  55. Mike // November 22, 2011 10:34:00 AM GMT  

    @tcokli,
    try to set option "title" to 0 to hide post title..
    ,titles:0

    For further help please email me..

  56. tcokli // November 22, 2011 10:49:00 AM GMT  

    thank you! i got it!

  57. The Lost Observer // December 1, 2011 6:26:00 AM GMT  

    Thanks for this great widget.
    When I place it as a HTML/JavaScript gadget on my sidebar, it shows up very well.
    But I need it to appear below my post. What do I need to do to place it there?

  58. Mike // December 1, 2011 10:44:00 PM GMT  

    @The Lost Observer,
    You can place code in another HTML/JS widget below the post.
    If you are familiar with Blogger template, you can manually place the code there.
    For further assistance, please email me.

  59. Sudhir Dudeja // December 16, 2011 6:35:00 AM GMT  

    Great plugin......

    i m getting a problem to install this plugin problem is that it showing me thumbnails when i insert code directly in my template but if i use same code in html/javascript element it will not showing any thumbnails

    where i am doing wrong can you plzz help me out

    i want that it will not show me any thumbnail when i use the code in my template directly


    my blog address is allmytutorials.blogspot.com

  60. Mike // December 16, 2011 11:44:00 AM GMT  

    @Sudhir Dudeja,
    You need to set "thumbs" option to 0 as in demo 1.
    Also, check plugin options for more info.

  61. Sudhir Dudeja // December 16, 2011 4:17:00 PM GMT  

    @mike

    thx for your reply

    i did it .

    i did every thing but i am not able to get transition effect with no thumbnails when i insert that code directly in my blogger.But when i add that code to html/javascript element i get transition effect with no thumbnails .

    i want to add these plugin below my post so i need to insert code directly in it.

  62. Mike // December 20, 2011 10:49:00 PM GMT  

    @Sudhir,
    You need to use option "show_n".. Please, refer to plugin options for more info.

  63. Dani // January 17, 2012 4:57:00 AM GMT  

    Wowww perfect widgets , it reallty fits on my template , ,

  64. Sanam // January 27, 2012 6:57:00 PM GMT  

    Hi, i tried getting this widget but once I had put it onto my blog nothing came up, all that I can see is "loading..." on the sidebar. If you could help me out i would really appreciate it!

    My blog is http://www.daybydiva.com/

  65. Mike // January 27, 2012 7:37:00 PM GMT  

    @Sanam,
    The problem is that jQuery script is included twice in your blog.. You need to include it once in your page <head>

    * For more info please email me..

  66. Anonymous // January 28, 2012 7:14:00 PM GMT  

    sir this related post widjet not working it seem recent post please tell me about this query from http://todayprice.in how to add related post widjet

  67. Mike // January 28, 2012 7:51:00 PM GMT  

    Hi Anonymous,
    The widgets works fine in homepage since posts labels(tags) are their, but in post page labels are missing! Widget needs those labels to get related posts!

  68. The game // February 7, 2012 1:25:00 PM GMT  

    Hi
    Thank's for widgets
    in I tried the widgets Demo 3 I have a variation of picture size.
    And I want to remove a Related Title

  69. Mike // February 10, 2012 1:50:00 PM GMT  

    @TheGame,
    please email more details on the issue and your url

  70. The game // February 10, 2012 11:56:00 PM GMT  

    Hi Mike
    ok this my blog I add widgets Related post demo 3
    http://games-for-game.blogspot.com/
    as you see it, there is a variation of size.
    I tried to make it correct but I have not found the solution.
    exemple for size Width: 300px And Height: 150px

  71. Mike // February 11, 2012 12:23:00 AM GMT  

    @TheGame,
    try a cropped thumb_size like this 's104-c', it will return images exactly 104x104 pixels..

    For info, plz refer to plugin options
    http://code.google.com/p/blogger-related-posts/wiki/Options_v2

  72. Smart // February 17, 2012 1:46:00 AM GMT  

    I couldn't get that working on my blog

  73. Mike // February 17, 2012 11:04:00 AM GMT  

    @Smart,
    please email me more details and your url..

Post a Comment

Thank you for taking the time to comment..
* If you have a tech issue with one of my plugins, you may email me on mike[at]moretechtips.net

Mike

Mike MoreWeb developer, jQuery plugin author, social media fan and Technology Blogger.
My favorite topics are: jQuery , Javascript , ASP.Net , Twitter , Google..
<connect with="me"> </connect>

Subscribe by email

Enter your email address:

or via RSS