How to Make Posts Display Different on Blogger

Generally, every appearance or style on the blogger posting page is the same. Both from shape, color, size, and other elements.

For those who have often fiddled with blogger templates, you may have come across or heard of conditional tags.
Generally, this conditional tag is used to create different styles on each page. Usually used on home pages, posts, and pages.

Conditional tags for home pages, posts, and pages are probably very common. It can also be said that the code for each template is the same. So its not too difficult to use in my opinion.

The question is how to make different styles in the same type of page?

At first I was also confused looking here and there and tried to use the conditional tag data:view.postId but it failed too.

After several times of research and exploration I finally found the solution. Even though it’s a bit tricky…

Page Specific Conditional Tags

To make different post styles or appearances in blogger, I combine conditional attributes with blogger url data.

More or less the general form of conditional attributes and their expressions is like this


cond='data:view.url == url_postingan_atau_laman'

For more than one url it becomes like this


cond='data:view.url in ["url","url","url"]'

The next step, friends, can add a tag in front of the attribute, usually what we often use is b:if or b:class. Please adjust it according to your needs.

The following is an example of a certain post page conditional tag using the b:if tag tag
1 page only


<b:if cond='data:view.url == &quot;https://rebozasambirejo.blogspot.com/2021/04/membuat-template-blog-sendiri.html&quot'>
kode
</b:if>

&quot equal to quotation marks (“)

Multiple Pages


<b:if cond='data:view.url in [&quot;https://rebozasambirejo.blogspot.com/2021/04/membuat-template-blog-sendiri.html&quot;,&quot;https://rebozasambirejo.blogspot.com/2021/04/css-dasar-template-blogger.html&quot;,&quot;https://rebozasambirejo.blogspot.com/2021/05/cara-termudah-mengganti-font-blogger.html&quot;,&quot;https://rebozasambirejo.blogspot.com/2021/05/mendesain-header-blogger.html&quot;]'>
kode
</b:if>

For examples or implementation results of certain post page conditional tags, friends, you can compare the appearance of this page with the following post page
https://rebozasambirejo.blogspot.com/2021/04/make-template-blog-diri.html

If you’re still having trouble or if you have a request for a blog tutorial, you can comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get Free Online Cooking Classes
Are you looking for resources on how to cook online that will help you in the culinary arts?
Yes, Please