How to Install the Latest Blogger Conditional Tags 2020

BloggerByte.Net - How to Install the Latest Blogger Conditional Tags 2020. What is Conditional Tag? Conditional Tag (Conditional Tags) is an HTML programming language that contains commands to load or display Widgets, HTML, CSS and JavaScript in accordance with the conditions command of the Conditional Tag.

Conditional Tag (Conditional Tags) is usually much applied in blogger template. For those of you who often edit or often create blogger templates, this is definitely no stranger to Conditional Tags, this is also a very important part of blogger templates, because it can make it easier to load certain HTML files contained therein.

Examples such as, if we want to display the table only in the Hompage (Main Page Blog) does not appear on other pages, then you can use tags <b:if cond='data:view.isHomepage'>. seen from the code can certainly understand how it works, so you can interpret it like this "If the data is visible on the Main Page".

Of course there are still many other Conditional Tag codes, This time the i will discuss them, so please friend can see.

Latest Conditional Tags (Conditional Tags), Functions and How to Use them.

Here are some conditional tags from the oldest to the newest, and friend, make sure to use the latest conditional tag code.


HomePage Conditional Tag (Main Page)

This tag will display widgets and other code, only on the Blog Main Page.

Example Homepage URL : https://www.bloggerbyte.net.

Older Version
<b:if cond='data:blog.url == data:blog.homepageUrl'>
New version
<b:if cond='data:view.isHomepage'>

IndexPage Conditional Tag (Index Page)

This tag displays Widgets and other code only on the Index page. Examples of index pages that are commonly found are Main Page, Label Page, Search Query Page, and Archive Page.

Older Version
<b:if cond='data:blog.pageType == "index"'>
New version
<b:if cond='data:view.isMultipleItems'>

Item Page Conditional Tags

This tag displays Widgets and other code only on Item Pages, Item pages are the type of page that always ends with a file page.

Older Version
<b:if cond='data:blog.pageType in ["item", "static_page"]'>
New version
<b:if cond='data:view.isSingleItem'>

Page Conditional Tag Posts

This tag displays widgets and other code only in the posting page.

Older Version
<b:if cond='data:blog.pageType == "item"'>
New version
<b:if cond='data:view.isPost'>

Static Page Conditional Tag (Static Page)

This tag will display widgets and other code only on static pages. And usually static pages are used to create pages about, contact and others.

Older Version
<b:if cond='data:blog.pageType == "static_page"'>
New version
<b:if cond='data:view.isPage'>

Page Conditional Tag Label

This tag will display widgets and other code only in the label page.

Older Version
<b:if cond='data:view.isLabelSearch'>
New version
<b:if cond='data:blog.searchLabel'>

Conditional Tags on Certain Labels

This tag will display widgets and other code only on certain labels.

Older Version
<b:if cond='data:view.search.label == &quot;Suatu-Label&quot;'></b:if>
New version
<b:if cond='data:blog.searchLabel == &quot;Suatu-Label&quot;'></b:if>

Conditional Tag Search page (Search Page)

This tag will display widgets and other code only in search results.

Older Version
<b:if cond='data:blog.searchQuery'>
New version
<!-- Includes a label search page -->
<b:if cond='data:view.isSearch'>
<!-- Search page only -->
<b:if cond='data:view.isSearch and !data:view.isLabelSearch'>

Archive Page Conditional Tag

This Conditional Tag will display widgets and other code only on the archive page.

Older Version
<b:if cond='data:blog.pageType == "archive"'>
New version
<b:if cond='data:view.isArchive'>

Conditional Tag Page 404 Page Not Found

This tag will display widgets and other code on the error page only, and usually if there is a specific page request and the page does not exist, it will go directly to the redirect to the Error Page page.

Older Version
<b:if cond='data:blog.pageType == “error_page”>
New version
<b:if cond='data:view.isError'>

Conditional Tag Preview page (Preview Page)

This tag will display widgets and other code only in the Preview Page, and of course you are familiar if you often write in the blog editor and often use preview pages or preview pages.

Older Version
<!-- Not available -->
New version
<b:if cond='data:view.isPreview'>

Conditional tags are out of Condition or an exception

The Conditional Tags previously explained how to place element code in HTML, CSS, JS, Blog Widgets in one condition. But if you want to make tags out of condition, then you only need to change the code == to !=.

<b:if cond='data:blog.pageType != &quot;index&quot;'></b:if>

The code above explains, the index page is Homepage, Search Label, and archive, then with the code != it will be outside the index page, so on the posting page and static page. For the latest version of the code, you can use the code ! or NOT the location of the placement in front. Example.

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

Join conditional tags (Multi Tags)

To combine 2 condition tags at once with the same function. Example:

<b:if cond='data:blog.pageType != &quot;item&quot; or data:blog.pageType != &quot;static_page&quot;'></b:if> 

From the example tag the condition above means it will appear on the page outside the item and the static page. Or has meaning if one is true then the condition will be displayed. And if you have to under certain conditions then use AND.

How to combine many page URLs on a particular page tag, my friend can see the code below.

<b:if cond='data:view.url in {&quot;Url halaman A&quot;,&quot;Url halaman B&quot;,&quot;Url halaman seterusnya&quot;}'></b:if>

Please refer to the comma friend (,). And on the other hand use AND, which means that the use of the two or more conditions is true then it will be displayed, and if one is incorrect then it will not be displayed. If Not displayed another <b:else>

If you want to display different conditions on the page, you don't have to use two conditional tags, see below

<b:if cond='data:blog.pageType == &quot;item&quot;'> 1 <b:else/> 2 </b:if>

The code above explains that it will be on the post page, but if the page isn't posted it will use two, in conclusion the <b:else/>tag works for the code exclusion above.

For placement tags, the <b:else/> placement is always shared with the tag <b:if>. tag <b:else>can be buddy artiken as a command "can also" or "and also". And for an example of its application as below.

<b:if cond='data:view.isHomepage'> 
[...content1...]
<b:else />
[...content2...]
</b:if>

After seeing the code above, my friend might be able to deduce how to implement and how the b:else tag works.


Special Conditional Tags for Mobile

This tag functions to show widgets and HTML code, CSS etc., appear on Mobile only. The code can be below.

Older Version
<b:if cond='data:blog.isMobileRequest'></b:if>
New Version
<b:if cond='data:mobile'>

Those are some conditional tags for bloggers, above are the basics. - basically, there are actually many other conditional tags.

That's all about the Latest Conditional Tags , Functions and How to Use them. Hopefully this can be useful and thank you.

About the Author

“Hustle in silence and let your success make the noise.”

إرسال تعليق

Check the "Notify me" box to get an email notification if someone replies to a comment.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.