List Of Blogger Conditional Tags



Conditional tags are Blogger template tags that allow you to specify parts of your template to appear only under certain conditions. One particularly useful application of conditional tags is in specifying on which page or pages a HTML element should appear.

Ever wish you could display only relevant widgets onto a page, hide sidebars on certain pages, display different buttons on different pages, or apply a meta tag only to selected pages? Well, if applied properly, conditional tags can make all that happen.

Blogger Conditional Tag Syntax:

<b:if cond='TYPE_CONDITION_HERE'>


List Of Blogger Conditional Tags

Index (list) pages

Index pages include homepage, labels page and yearly archive page.
<b:if cond='data:blog.pageType == "index"'>

Post (item) pages

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

Static pages

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

Archive pages

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

Homepage

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

Specific page/URL

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

Post and static pages

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

Label-search pages

<b:if cond='data:blog.searchLabel'>

First post

This is not a page, but a conditional for the first post. Used for targeting the first post on multi-post pages.
<b:if cond='data:post.isFirstPost'>

1 comments:

Very nice post . Very useful for for me
Nice post
GrameenPhone Offer | Banglalink Offer | Robi offer

Reply

Post a Comment