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 Code text just replace your code with this text.
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 Code text 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 == "index"'>
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 == "archive"'>
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 == "item"'>
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 == "static_page"'>
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 == "error_page"'>
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== "label_here"'>
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 == "terms_here"'>
Add Your Code
</b:if>
Post a Comment
Don't try to spam here, our team review every comment