7 Blogger page types & most used Blogger conditional tags

Blogger has a lot of conditional tags but in this tutorial, we are talking about the top 7 most used Blogger page types conditional tags. If you want to know Blogger theme designing and developing than knowing the conditional tag is essential for you.

if you have a question about what is conditional tags, then read the below lines of this article.

A conditional tag basically adds a condition to your code. You may know blogger theme runs on the XML format and XML run on the base of HTML, it's also called XHTML. For example, if you add a condition on your theme by using a conditional tag like the view.isHomepage then if you write any code on this conditional tag, it's only visible for the homepage.


Before telling you the top 7 page types conditional tags, I gonna clear you on the main content area of the conditional tag I add Add Your Codetext just replace your code with this text.

Index Page

If you add any things on this tag then the code will be shown on the homepage and search result page.
<b:if cond='data:blog.pageType == &quot;index&quot;'>
Add Your Code
</b:if>

Archive Page

If you add any things on this tag then the code will be shown on the archive page only.
<b:if cond='data:blog.pageType == &quot;archive&quot;'>
Add Your Code
</b:if>

Item Page

If you add any things on this tag then the code will be shown on all posts.
<b:if cond='data:blog.pageType == &quot;item&quot;'>
Add Your Code
</b:if>
There is another conditional tag for the first post only.
<b:if cond='data:post.isFirstPost'>
Add Your Code
</b:if>

Static Page

If you add any things on this tag then the code will be shown on all pages.
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
Add Your Code
</b:if>

Error Page

If you add any things on this tag then the code will be shown on the 404 error page.
<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
Add Your Code
</b:if>

Label Page

If you add any things on this tag then the code will be shown on the label result page.
<b:if cond='data:blog.searchLabel'>
Add Your Code
</b:if>
There is another label for the targeted label result page just add your targeted result on the label_here.
<b:if cond='data:blog.searchLabel== &quot;label_here&quot;'>
Add Your Code
</b:if>

Search Page

If you add any things on this tag then the code will be shown on the search result page.
<b:if cond='data:blog.searchQuery'>
Add Your Code
</b:if>
There is another search result tag for the targeted search terms just add your targeted terms on the terms_here.
<b:if cond='data:blog.searchQuery == &quot;terms_here&quot;'>
Add Your Code
</b:if>

Conclusion

In this article, I am describing about top 7 most useful blogger page type conditional tags that are essential if you want to be a blogger theme devoloper. That's it for today thanks for with us.
Article "7 Blogger page types & most used Blogger conditional tags" protected
Post a Comment (0)
Previous Post Next Post