What is Blogger Conditional Tags
Conditional tags are sets of HTML codes or HTML tags which can be use to display a specific widget, gadget or element on a specific page of a website i.e You can have a widget on your Blogger website and choose to make it visible on some pages and hide it from some pages using conditional tags.
A very good example of this application is the sidebar element of a web page; for some website, if you open to the homepage, the sidebar section will not be displayed but once the post page is opened, you will see the sidebar appear on page. This action is done making use of some conditional tags or call it variables.
This application also helps website containing lot of widget reducing the page load speed of some pages by hiding some heavy widgets from a sensitive page of the website.
Conditional Tags for all Blogger Page Type
Below are the list of all Blogger Conditional Tags read calmly and know how to make use of them.
Conditional Tags on Homepage
New Format
<b:if cond='data:view.isHomepage'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.url == data:blog.homepageUrl'> Input the Widget or element codes here... </b:if>
Conditional Tags on the Index Page
New Format
<b:if cond='data:view.isMultipleItems'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.pageType == "index"'> Input the Widget or element codes here... </b:if>
Conditional Tags on Item Page
New Format
<b:if cond='data:view.isSingleItem'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.pageType in ["item", "static_page"]'> Input the Widget or element codes here... </b:if>
Conditional Tags on Post Page
New Format
<b:if cond='data:view.isPost'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.pageType == "item"'> Input the Widget or element codes here... </b:if>
Conditional Tags on Static Page
New Format
<b:if cond='data:view.isPage'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.pageType == "static_page"'> Input the Widget or element codes here... </b:if>
Specific Static Page by URL
<b:if cond='data:blog.url == data:blog.canonicalHomepageUrl + "PAGE_URL"'> Input the Widget or element codes here... </b:if>
Conditional Tags on the Label Page
New Format
<b:if cond='data:view.isLabelSearch'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.searchLabel'> Input the Widget or element codes here... </b:if>
See also: 10 Blogger Widgets or Plugins That Must not be Missing on Your Blog
Specific Label Page by Label
<b:if cond='data:blog.searchLabel == "LABEL_NAME"'> Input the Widget or element codes here... </b:if>
Conditional Tags on Archive Pages
New Format
<b:if cond='data:view.isArchive'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.pageType == "archive"'> Input the Widget or element codes here... </b:if>
Conditional Tags for Search and Label Search Page
New Format
<b:if cond='data:view.isSearch'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.searchQuery'> Input the Widget or element codes here... </b:if>
Conditional Tags on Search Page Only!
<b:if cond='data:view.isSearch and !data:view.isLabelSearch'> Input the Widget or element codes here... </b:if>
Specific Search Query page by Word Query
<b:if cond='data:blog.searchQuery == "SPECIFIC_WORD"'> Input the Widget or element codes here... </b:if>
Conditional Tags on Error Pages
New Format
<b:if cond='data:view.isError'> Input the Widget or element codes here... </b:if>
Old Format
<b:if cond='data:blog.pageType == "error_page"'> Input the Widget or element codes here... </b:if>
Conditional Tags for Preview Pages
New Format
<b:if cond='data:view.isPreview'> Input the Widget or element codes here... </b:if>
New Format
<b:if cond='data:view.isPreview'> Input the Widget or element codes here... </b:if>
AND/NOT/OR Conditional Tags
AND Condition
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--search_page AND index_page-->
</b:if>
</b:if>
NOT Condition
<b:if cond='data:blog.pageType != "item"'>
<!-- all pages except item pages -->
</b:if>
<b:if cond='data:blog.url != data:blog.homepageUrl'>
<!-- all pages but NOT homepage -->
</b:if>
OR Condition
<b:if cond='data:blog.url == data:blog.canonicalHomepageUrl + "p/longtechy.html"'>
<!-- static_page longtechy OR static_page others -->
<b:else/>
<b:if cond='data:blog.url == data:blog.canonicalHomepageUrl + "p/others.htm"'>
<!-- page longtechy OR page others -->
</b:if>
</b:if>
With these Conditional Tags, I hope you can add to the functionality of your website so I advise you study the blogger variable and tag list so well to your understanding!
Do not forget to share with friends and drop comment below. Also follow us round on social media for more updates.
You can contact us for Advert or Link promotion on www.fetney.com. Nice and special offer ongoing