• Skip to main content
  • Sitemap
  • Chrome
  • WINYTIPS

Techknowl.com Blog: Free software reviews, downloads and Tech tips

At Techknowl.com we make it easy for you to find useful software for your Windows, Mac or Linux computers. We also provide tips on Blogger, Wordpress, social media services, SEO and useful Web apps.

Display Blogger widget only in home page

Last updated March 9, 2010

Usually , widgets in Blogger blogs are displayed in all pages .For eg: , look at the Get posts by email widget on my right side bar . It is displayed in all pages of my blog . Now if you want to display Blogger widget only in home page , you have to edit your Blogger template with the following strip (in blue) of code . Here is HTML2 is my widget id for “Get posts by Email “.There may be different ids for different widgets .
In each case , <b:if cond=’data:blog.url == data:blog.homepageUrl’> should be added to make them fixed to the home page .

<b:widget id='HTML2' locked='false' title='Get Posts By Email' type='HTML'><b:includable id='main'><b:if cond='data:blog.url == data:blog.homepageUrl'>  <!-- only display title if it's non-empty -->  <b:if cond='data:title != &quot;&quot;'>    <h2 class='title'><data:title/></h2>  </b:if>  <div class='widget-content'>    <data:content/>  </div>  </b:if>  <b:include name='quickedit'/></b:includable></b:widget>

Open your Blogger templates Layout and then Edit HTML
Click on expand widget templates . With Ctrl+F search for each widget with its ids or given label .
Now paste the code as specified and save your template . The edited Blogger widget would appear only in the homepage .

Note : You can display Blogger widget in all pages except home page by altering above code(in blue) with this one .
<b:if cond=’data:blog.pageType == “item”‘>

Or you can display a Blogger widget only in a particular post page by changing it with following code .

<b:if cond=’data:blog.url == “blog post URL”‘>

So ultimately you have the total control over the postion of  widgets in Blogger .

Reader Interactions

Leave a Reply Cancel reply

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

© 2022 · Techknowl