How to Show and Hide Blogger Widgets


How to Show and Hide Blogger WidgetsDo you have problem hiding or showing your widget on your blog? fear no more because today I will share to you blogging tricks on how to show and hide blogger widgets.

The importance of controlling your widgets is, there are plug ins that are meant to be shown only on homepages, or only on post pages. Through widget control. you create flexibility on your blog and balances each widget and maximize its functions.

In blogger platform, installing a widget usually uses the "HTML/layout" function on layout. In order to control widget display we just enclose some codes on the widget.

If you want to show and hide your widgets, just follow these simple tricks:



Since we use the "add gadget" on installing widgets, we need to search first where it is on your blog template.


How to control widget display


Before we proceed make sure you backed up your template in case you mess things up.

1. Log in to your dashboard.
2. Go to template> click edit HTML > and click on expand widget templates
3. Then look for a code similar to this one



<b:widget id='HTML' locked='false' title='WIDGET-TITLE-HERE' type='Profile'>
<b:includable id='main'>

WIDGET CODE HERE

</b:includable>
</b:widget>



If you use a blank name on your widget, try renaming it that has no similarity then go back to edit HTML and use ctrl + F to search for that widget title. After you searched for it you can rename it back to blank.



How to show widgets only on homepage?


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

WIDGET CODE HERE

</b:if>


How to hide widgets on homepage?


<b:if cond='data:blog.pageType == "item"'>

WIDGET CODE GOES HERE

</b:if>


How to show widgets only on static page?


<b:if cond='data:blog.pageType == "static_page"'>

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>


How to show a widget on selected post only?


<b:if cond='data:blog.url == "URL OF Selected Post"'>

WIDGET CODE GOES HERE

</b:if>

How to hide widget on selected post only?


<b:if cond='data:blog.url != "URL OF Selected Post"'>

WIDGET CODE GOES HERE

</b:if>


Note: Once you find your widget just select which code you will use to hide or show widgets. 

For example you want to show widgets only on home pages, use this



<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 HERE


</b:if> 

</b:includable>
</b:widget>



Do you like it? got some problems? let me read your thoughts



Facebook Blogger Plugin: Bloggerized by Bloggerpreneur Enhanced by fromhobby2money.blogspot.com

Search This Blog

Visitors