Sunday, October 9, 2011

Blogger Basic Conditional Tags

Sponsored Ads

Blog Design Tutorial | Blogger Conditional Tags

Blogger conditional tags are very useful in blog design especially when you want to make certain widgets or ads appear or disappear in different conditions. Blogger conditional tags are just like if and else statement C++. Once you get a grip on how to use it, using blogger conditional tags are quite simple.

Blogger conditional tags are very useful to create a good blog design. You can choose to make widgets and ads appear on different condition by using blogger conditional tags. Learn more about conditional tags in this post and you can make your blog works the way you wanted it to be.

What is Blogger Conditional Tags

Blogger Conditional tags are conditional codes that are being used in blogger's blog.Conditional tags are just the same like if else statement of programming languages. If you have some basic in programming, then conditional tags should not be a problem for you to understand.

Different Types of Blogger Conditional Tags and Meaning of the Conditional Tags

The conditional tags below are used in blogger's blog. Try to learn and get to know the meaning of each of them because it is very useful when you are editing blogger's template.

1. Homepage Only
Sometimes, our blog has several widgets that we would like to show only in the homepage. Take one example: Popular Posts and AdSense Ads. Normally, for these two things, we would like them to appear in the homepage but not showing them on other pages. So, you can use conditional tags to make them to appear only in Homepage. If  you are pretty sure you only want it to appear on Homepage Only, then you can use the conditional tags codes below:

<b:if cond='data:blog.url == data:blog.homepageUrl'>
Your Widgets Codes Here

2. Item Page
What if you would like to make some widgets to appear only in the post pages but not somewhere else. So, conditional tags of blogger comes into place again. You can condition your widget to appear in item page (post page) by using the codes below:

<b:if cond='data:blog.pageType == &quot;item&quot;'>
Your Widgets Codes Here

3. Particular URL
Other than post pages and index page, you can also use conditional tags to target specific URL of your blog. Maybe you are writing about cars such as Lamborghini and you only want to show pictures of Lamborghini ONLY on the post page of Lamborghini post. So now, you can use the codes below to target that specific post URL and make the picture appear.

<b:if cond='data:blog.url == &quot;URL of the page&quot;'>
Your Widgets Codes Here

4. Index Page
What is index page in blogger? Index page is pages such as homepage, labels page and archive page. I am not sure what will we put on label pages and archive pages, so I think this codes will be quite redundant. But, if you have somethings that you want them to appear in index page, you can use the codes below:

<b:if cond='data:blog.pageType == &quot;index&quot;'>
Your Widgets Codes Here

That's it. I summarized the conditional tags into the 4 types as discuss above. If you can understand the conditional tags above, you should be able to use them for different condition for your blog. You can make certain widgets or ads to appear on certain pages of your blog. This would create a more flexible and more engaging blog.

You might want to read about "Disable AutoJump of Blogger Blogspot"

About the Author: This Post is written by William Lee (Nickname: Greenleaf). Make money blogging and work from home is the best job I ever experienced.