Easy Hack to Hide Sidebar Content on Blogger

 I wanted to do a little clean up on this blog.  Mainly, I hate how the sidebar takes up room on every post.  It’s cluttered, it’s ugly, and it takes away from the content.  Users don’t need to see that everywhere.  Here’s an easy little hack to clean up your blog and get rid of that using conditionals.

First, expand the code in the edit html view so you can see the entire template.  Next, look in the code for the elements <b:widget>.  Your code will look similar to this, but without the highlighted text.  By adding the code in red, the sidebar is not present if the pageType doesn’t equal “item”.

<b:widget id=’HTML4′ locked=’false’ title=” type=’HTML’>
<b:includable id=’main’>
  <b:if cond=’data:blog.pageType != &quot;item&quot;’>
  <!– only display title if it’s non-empty –>
  <b:if cond=’data:title != &quot;&quot;’>
    <h2 class=’title’><data:title/></h2>
  <div class=’widget-content’>

  <b:include name=’quickedit’/>

It’s relatively easy and will have your blog looking cleaner in no time.

Leave a Reply