I recently installed LinkWithin to my blog since after changing my template, I forgot to backup my previous code on 'related posts list' widget.

LinkWithin is a blog widget that appears under each post, linking to related stories from your blog archive.

I find this widget nicer than my old one since it has thumbnails that attract more attention and it is easy to install. The only issue I hate about this is that it messes up my front page index by polluting it with lots of thumbnails. It gives me a lot of pictures that make my blog's home page too colorful.

So basically, what I wanted is to remove the LinkWithin widget on the homepage and show it only when a blog article's page is opened. So here's a step by step solution on how to solve this.

Steps on how to remove LinkWithin on blogger's home page

  1. Log-in to blogger and go to 'Design' > 'Edit HTML'

  2. Though optional, it is always recommended to back up your current template before digging to the code. So make sure to click on 'Download Full Template'.

  3. Check 'Expand Widget Templates'

  4. Look for locked='false' title='LinkWithin' type='HTML'.

    on your template. You should find something like this:

    <b:widget id="HTML4" locked="false" title="LinkWithin" type="HTML">
     <b:includable id="main"><data:content></data:content></b:includable>

    take note of the widget's id, which is HTML4 in my example. This is usually a unique id generated by blogger and so this might be different in your case.

  5. Replace the code
    <b:includable id="main"><data:content></data:content></b:includable>
    with this one:
    <b:includable id='main'>
     <b:if cond='data:blog.pageType == &quot;item&quot;'>
      <data:content />
  6. Save and view your home page now.

And that's it! So if you are like me who hates the same thing about LinkWithin, then the code above should do the trick.

Happy coding :)

UPDATE 03/01/13: Updated code issue about quotations and apostrophe.


  1. Nice Tweak AJ! Very understandable! This will make the homepage more cleaner and also make loading homepage faster!

  2. thanks! actually I never thought of making the homepage load faster since my concern was the cleanliness of the homepage, but since you mention it... yeah you're right, it will make things more faster :D

  3. Just consider it as a bonus in this tweak since there are many images that will load in the homepage if not modified. BTW I think the code you do is much cleaner than what I do.

  4. Good day AJ.Thanks, almost the same steps I did in my page.You have a great looking lay-out today buddy.Everything is improving.Keep up the good work...:)

  5. thanks ben! glad to know that I'm not the only one who's disturb with linkwithin's feature :)

  6. I need this. Thanks AJ! I will have some tweaks now. 

  7. Wow mine is fixed now. Good job Aj! I've got error with the quotation but successful indeed .

  8. glad that it helped you.

    Thanks for pointing out the quotation error, my CSS styling seems to mess up the code itself, I'll just update it :)

  9. My platform is WP but I will still thank you for sharing this...I have many friends who use Blogger platforms

  10. welcome here Sir John! :)

    yeah, I think this would be very useful for blogger users.

    thanks for visiting!

  11. Isn't there an option to display the thumbnails only when viewing the article in full and hidden when in the list or when you opt to display multiple posts in a front page? I was a user of LinkWithin in my blogger hosted blogs but removed them eventually. It forces me to include an image in every post. It has to be done or your thumbnails won't look good.

    But a detailed guide here for the blogger users. Keep them going!

  12. great insight,  I think the thumbnails are one reason why most people use LinkWithin but I do get your point and share the same sentiment about it. 

    Thanks for the idea, I'll try to study how it works and probably post another post on how to resolve it. :)

  13. Hi AJ,
    Thanks for your help. It worked eventually.
    I remove HTML5 widget, the following codes:

    if you visit my photoblog again, the LinkWithin would have been removed now.

    Kind regards,

  14. glad that I was able to help you :)

  15. I need to remove it completely as it links to another blog I didn't want it to point to. For now I want it that way, without LinkWithin.

    Maybe in future I'll try out what you showed in this posting.

  16. good share aji! i'll think about that! There is also good idea.

  17. Great sharing AJ. You shared a good coding in blogging. Keep it up!

  18.  Hi again Aj,
    Thanks for the pointers. I've tried removing the widget associated with HTML6 as follows:

    Then I saved and view my blog. The LinkWithin is still there to my disappointment. I really want to get rid of this completely.I have contacted LinkWithin via their feedback page but never get any reply so far.Thanks for your help, btw.

  19. awww cool sir aj.  Im not quite sure yet if Im gonna do this,but I think, I prefer to show link within in my homepage. thanks for this

  20. thanks for dropping by! :) 

    well, the linkwithin surely shows your old posts for your guests and visitors to read but loading on the homepage is quite messy for some like me :)so i guess, it all depends on the users.

  21. jimjessbaker3/1/12, 5:58 AM

    i did what you suggested above and it does not show up on any of the pages anymore?  http://jimjessbaker.blogspot.com  thank you for your time

  22. jimjessbaker3/1/12, 6:18 AM

    nevermind, i found a solution that worked, thank you!

  23. worked like a charm. thank you

  24. I applied this one and it completely removed my linkwithin widget. :(