How to Show Widget Only at Homepage in Blogger Website?

Whenever anyone wants to add a new widget in the Blogger layout, it is automatically able to show that widget on all pages, which is unnecessary.

Hey learners,

Show Widget Only at Homepage in Blogger Website is the most common problem that most bloggers might face. Whenever anyone wants to add a new widget in the Blogger layout, it is automatically able to show that widget on all pages, which is unnecessary. So in this article we will help you with How to Show Widget Only at Homepage in Blogger Website?

How to Show Widget Only at Homepage in Blogger Website?
How to Show Widget Only at Homepage in Blogger Website?

How to Show Widget Only at Homepage in Blogger Website?

Just follow the below steps to do it:

  • Open Blogger Dashboard.
  • Go to theme setting.
  • Click on Edit Html option.
  • In the HTML section, find your piece of code for that particular widget in which you want to make change.
  • Once you find it, scroll down 10 to 15 lines to find this code: <b:includable id='main'>
  • Now make changes in your according to the below source codes.

Example
<b:widget id='HTML1' locked='false' title='Recent Posts' 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 != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>

Only two lines of code are added externally, which are: 

<b:if cond='data:blog.url == data:blog.homepageUrl'>

</b:if>

Must notice the sequence of source code as represented in the above code box.  I think that's it for this post. Let me know in the comment if there is any query.

I'm a passionate content-writer.

Post a Comment

We appreciate you taking the time to read our content. We now want to hear your thoughts on this content.