Latest Blogger Conditional Tags 2022

Latest Blogger Conditional Tags 2022 - The blogger conditional tag functions to display widgets or recourses such as CSS and JavaScript on certain ...

The Latest Blogger Conditional Tags Collection 2022 – Hello blogger friends, in this article I will share an explanation of the conditional tags used in xml templates, especially on the blogger platform.

Latest Blogger Conditional Tags 2022

The blogger conditional tag functions to display widgets or recourses such as CSS and JavaScript on certain pages. For example, you want to display the latest article widget only in posts, other than the posting page, the widget will not appear.

You can find this conditional blogger tag in the <b:if cond='…'> tag which ends in </b:if> and can be followed by several conditions such as AND, OR and NOT. Alright, here's an explanation of the latest blogger conditional tags.

Index Page Conditional Tags

The index page is a page that displays or contains many posts. Some pages that include index pages such as homepage, label, search and archive (except posts and static pages). Here's the blogger conditional tag for the index page.

New version

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

Old version

  • <b:if cond='data:blog.pageType == “index”'>

Homepage Conditional Tags

The homepage is the page that appears first when a visitor opens the web that contains navigation to other pages. The homepage page has the address on the main domain.

Example of homepage URL: example.com

New version

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

Old version

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

Item Page Conditional Tags

Item page is a page that displays the entire contents of a web page. Pages that include item pages are post pages and static pages. Here's the blogger conditional tag for the item page.

New version

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

Old version

  • <b:if cond='data:blog.pageType in [“item”, “static_page”]'>

Post Page Conditional Tags

Post page is a page that displays the contents of a web page. This page is dynamic which can be used to load articles such as information or news. Of course you already understand that you are reading this article on the posting page.

Example of post page URL: example.com/2020/02/tag-conditional-blogger.html

New version

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

Old version

  • <b:if cond='data:blog.pageType == “item”'>

Static Page Conditional Tags

Static pages are permanent pages from the web, static pages are commonly used on About, Contact Us and Privacy Policy pages.

Example of a static page URL: example.com/p/blog-page.html

New version

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

Old version

  • <b:if cond='data:blog.pageType == “static_page”'>

Label Page Conditional Tags

Labels page is a page that contains a list of posts that are on a certain label. You can find labels on the blog's navigation menu that contains a link to the label page to make it easier for visitors to find the posts they want.

Example URL: example.com/search/label/Tips

New version

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

Old version

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

Archive Page Conditional Tags

The archive page contains a list of posts published on a monthly and yearly timeframe.

New version

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

Old version

  • <b:if cond='data:blog.pageType == “archive”'>

Search Page Conditional Tags

A search page or search query is a page that opens when a visitor performs a search with a particular query through a blog search or search. This page will display a list of posts that match the search query.

Example search page URL: example.com/search?q=tag+conditional

New version includes label search page

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

New version only search page

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

Old version

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

Error Page Conditional Tags / Error 404

The error page or 404 not found error is a page that appears if the url is not found, it could be because the user made a typo or the link in the navigation was wrong.

New version

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

Old version

  • <b:if cond='data:blog.pageType == “error_page”'>

Preview Page Conditional Tags

Preview page is used to display the post page before it is published. Here's the conditional tag for the preview page.

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

Mobile Device Conditional Tags

This tag is used to add parameter m=1 which means it is displayed for mobile devices.

  • <b:if cond='data:view.isMobile'>

Conditional Tags for Thumbnails

  • <b:if cond='data:post.thumbnailUrl'>

And others…..

Use "AND" "OR" "NOT"

AND

Use and , then the page will appear if it meets both conditional tags. Here's an example of a conditional tag for an index page except the search page (I also used the not condition).

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

OR

Use or if you want to display multiple pages in question in the conditional tag. Below are examples of conditional tags for archive pages and label pages, or one of these pages.

  • <b:if cond='data:view.isArchive or data:view.isLabelSearch'>

NOT

Use ! if you do not want to appear on the page in question. The following is an example of a conditional tag that does not display on the  homepage only.

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

Closing

That was a discussion about some blogger conditional tags, there are still many conventional tags that have not been discussed in this article but in the future I will update some more conditional tags. Alright that's it for this article, hopefully it's useful.

Relevant Tips is a blogging platform about Blogger, Relevant information, Digital marketing and so on.

Post a Comment