- Go To Blogger >> Design (or) Template(for new interface) >> Edit HTML
- Backup your template
- Check the Expand Widgets Templates Box
- Search for the title of the widget you want to control
- The code for the widget will look something similar to this one,
<b:widget id='HTML' locked='false' title='WIDGET-TITLE-HERE' type='Profile'>
<b:includable id='main'>
WIDGET CODE GOES HERE
</b:includable> </b:widget>
On finding the title in place of WIDGET-TITLE-HERE you will find two similar codes like those I have shown in blueYou just need to add the Controlling codes in the following manner. For example if you wish to show a widget at Homepage only then do this,<b:includable id='main'>
WIDGET CODE GOES HERE
</b:includable> </b:widget>
<b:widget id='HTML' locked='false' title='WIDGET-TITLE-HERE' type='Profile'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
WIDGET CODE GOES HERE
</b:if>
</b:includable> </b:widget>
where WIDGET CODE GOES HERE is the code of the widget you want to show or hide.<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
WIDGET CODE GOES HERE
</b:if>
</b:includable> </b:widget>
How to Hide Widgets On Homepages?
The same procedure can be applied to hide widget on homepage. <b:if cond='data:blog.pageType == "item"'>
WIDGET CODE GOES HERE
</b:if>
WIDGET CODE GOES HERE
</b:if>
How To Show Widgets Only On Static Pages?
<b:if cond='data:blog.pageType == "static_page"'>
WIDGET CODE GOES HERE
</b:if>
WIDGET CODE GOES HERE
</b:if>
How To Hide Widgets On Static Pages?
<b:if cond='data:blog.pageType != "static_page"'>
WIDGET CODE GOES HERE
</b:if>
WIDGET CODE GOES HERE
</b:if>
How To Show a Widget On a Selected Post Only?
<b:if cond='data:blog.url == "URL OF Selected Post"'>
WIDGET CODE GOES HERE
</b:if>
WIDGET CODE GOES HERE
</b:if>
How To Hide a Widget On a Selected Post?
<b:if cond='data:blog.url != "URL OF Selected Post"'>
WIDGET CODE GOES HERE
</b:if>
WIDGET CODE GOES HERE
</b:if>
That’s it. Do the same for applying any controlling code.
0 comments :
Post a Comment