How To Show Widgets Only in Static Pages in Blogger Blog

If you want to display your widgets only on specific static pages, this will be the good tutorial for you. Using this blogger trick you will learn how to place widgets on a single blog page. You can add more specific widgets to your pages, those widgets wont related to other pages. Because this situation we are going use this blogger trick to show widget only on static pages.

The below steps will help you to display widgets only in static pages.

Step 1: Log in to blogger blog

Step 2: Open Template section and Click Edit Template.

Step 3: Search widget that you want to display only in static page.

Step 4: Expand widget and it will look like below. After <b:includable tag use the highlighted code. You need to give the condition. If data:blog.pageType == "paste your static_page URL" means your widgets only visible in specific static page.

<b:widget id='HTML3' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "static_page URL"'>
<!-- 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>

Step 5: Save your template and refresh your pages.

You need to make sure that you are using right code. You need to use <b:if cond='data:blog.pageType == "static_page URL"'> this code.

Thank you!!!

No comments:

Post a Comment