New Blogger Conditional Tags on 2022


To read fully about Page Types and Conditional tags, go to this page:

Blogger Page Types and Conditional Tags : Make your Blog Dynamic


Now, Here are some new Blogger Conditional Tag that you can add to themes to wrap certain code. Old blogger conditional tags mentioned in above link also works fine as always.

Blogger Conditional Tags for Home Page :

New Version:

<b:if cond='data:view.isHomepage'>
    
</b:if>

Old Version:

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


Blogger Conditional Tag for the Index Page :

New Version

<b:if cond='data:view.isMultipleItems'>
    
</b:if>

Old Version

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


Blogger Conditional Tag for Item Pages:

New Version:

<b:if cond='data:view.isSingleItem'>
    
</b:if>

Old Version:

<b:if cond='data:blog.pageType in ["item", "static_page"]'>
    
</b:if>


Blogger Conditional Tag for Post Pages:

New Version:

<b:if cond='data:view.isPost'>
    
</b:if>

Old Version:

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


Blogger Conditional Tags for Static Pages:

New Version:

<b:if cond='data:view.isPage'>
    
</b:if>

Old Version:

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


Blogger Conditional Tag for Label Page:

New Version

<b:if cond='data:view.isLabelSearch'>
    
</b:if>

Old Version

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


Blogger Conditional Tags for Archive Pages:

New Version:

<b:if cond='data:view.isArchive'>
    
</b:if>

Old Version:

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


Blogger Conditional Tags for Search Page:

New Version:

<! - Includes label search page ->

<b:if cond='data:view.isSearch'>

</b:if>

<! - Just the search page ->

<b:if cond='data:view.isSearch and !data:view.isLabelSearch'>

</b:if>

Old Version:

<b:if cond='data:blog.searchQuery'>
    
</b:if>


Blogger Conditional Tag for Error Pages / Error 404 :

New Version:

<b:if cond='data:view.isError'>
    
</b:if>

Old Version:

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


Blogger Conditional Tags for Preview Page:

New Version:

<b:if cond='data:view.isPreview'>
    
</b:if>


No comments:

Post a Comment