How To Use Or Apply Conditional Tags In Blogger Platform

How To Use Or Apply Conditional Tags In Blogger Platform


How To Use Or Apply Conditional Tags In Blogger Platform


Blogger is the easiest blogging platform as compared to other platforms on the market. With the help of some web design languages people are making themes for blogger platform and yet this change the platform into a new level which was never seen. We have seen thousands of blogger themes / templates with thousands of different looks and layouts.

Here we have created a tutorial about using some default blogger conditional tags. These conditional tags can be used in creating blogger theme with a  totally different look for each and every page. Also it can be used to solve some problems of hiding and showing. These default conditional tags will help us to use some scripts / codes / css styles even any thing for a home page or specific page or blog post.

As we know blogger has a lot of default variables used in editing and automation of blogger template. This makes the blogger platform more outstanding. So lets start with the tutorial.

1. Show Anything Only On HomePage:

<b:if cond=’data:blog.url == data:blog.homepageUrl’>—–Your Content Goes Here——–</b:if>

Now the above conditional tag will only allow the content in your homepage. Whether that contains widgets, javascript code, html or css design. This also helps if you are creating a theme so you will add your custom design or something else to only show it on homepage.

2. Show Anything Only In Posts Of Blog:

<b:if cond=’data:blog.pageType == “item”‘>———Your Content Goes Here————–</b:if>

Now the above conditional tag will allow your content or what ever inside, will only show it on posts. For example if you want a different blog design while some one open posts and they see a different design, or you want to show some specific widgets or content only on blog posts it is easy for this purpose.

3. Hide Anything Only On Blog Posts:

<b:if cond=’data:blog.pageType!= “item”‘>———Your Content Goes Here———</b:if>

Well the above conditional tag will hide the inside content on your post pages. For example if you want to hide a widget, CSS design or any other content on your posts in blog so this is the tag you can use it.

4. Show Anything On Your Specified URL:

<b:if cond=’data:blog.url == “URL-OF-THE-PAGE”‘>——-Your Content Goes Here——–</b:if>

The above conditional tag is used for when you want to display some content in your specific page or blog post so by the help of the above tag you can display or allow the content, widget or any CSS design for a specific page. All you need to put the URL in the above URL-OF-THE-PAGE. So your desired content or whatever will be shown on your specified page or post.

5. Hide Anything On Your Specified URL:

<b:if cond=’data:blog.url != “URL of the page”‘>——Your Content Goes Here——–</b:if>

The above conditional tag is used to hide your content, widget or any thing you want in a specific page or any URL you want. For example you w

ant to hide all sidebar in “About” page of your blog so this is the right tag for you to use it and put all your sidebar inside the tag or use CSS design to hide the sidebar, then replace your page URL with the above URL OF THE PAGE.

6. Show Anything On Blogger Static Pages:

<b:if cond=’data:blog.pageType == “static_page”‘>——–Your Content Goes Here——-</b:if>

The above conditional tag is used for showing or displaying your content, widget or any type of HTML code only on a static blogger page. For example if you want to apply a specific design for your static pages in your blog theme so you can put all of the content between the above conditional tag.

7. Hide Anything On Blogger Static Pages:

<b:if cond=’data:blog.pageType != “static_page”‘>———Your Content Goes Here———–</b:if>

The above conditional tag is used for hiding your content, widget or anything you want in blogger static pages. For example you want to hide bottom widgets on blogger static pages to give a clean look so put your content inside conditional tag and that will be hidden while someone viewing your blog’s any static page.