How to display widget only on certain pages in the blog

This time My Backlink 86 discusses how to display the widget on a particular page on the blog as the main page / post pages and other pages.

Blogger Widget
illustration


Its function is to save space of your blog page as well as to speed up the loading blog besides your blog page is neat and professional look for the management of your blog.

This method is quite easy just to add some code, by adding the code then you can display the widget you want to appear on the page just as you want it.

Well without a lot of strings attached and practice you can see the code below:


1. Displays widgets only on page Archive alone.

<b:if cond='data:blog.pageType == &quot;archive&quot;'>
......................................................
</b:if>


2. View the widget on all pages except the archive page.

<b:if cond='data:blog.pageType != &quot;archive&quot;'>
......................................................
</b:if>



3. Displays widgets only on post pages.

<b:if cond='data:blog.pageType == &quot;item&quot;'>
......................................................
</b:if>


4. View the widget on all pages, except the post page.

<b:if cond='data:blog.pageType != &quot;item&quot;'>
......................................................
</b:if>


5. Displays widgets only on certain posts.

<b:if cond='data:blog.pageType == &quot;address-posts&quot;'>
......................................................
</b:if>


6. View the widget in addition to the specific post.

<b:if cond='data:blog.pageType != &quot;address-posts&quot;'>
......................................................
</b:if>


7. Displays widgets only on page staticpages.

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
......................................................
</b:if>


8. Displaying a widget on all pages, except staticpages page.

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
......................................................
</b:if>


9. Code widget displays only the particular url.

<b:if cond='data:blog.url == "URL page here"'>
......................................................
</b:if>


Note: Signs point - the point above is the widget code that must be in place.

Examples of applicability can do on an existing widget on your blog, for example, you only want to display the widget "Popular Posts" only appear on any item, then the following steps:

Example: popular posts widget code below:

<b:widget id='HTML4' locked='false' title='Popular posts' type='HTML'> <b:includable id='main'>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<!-- 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:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>