Conditional tags allow you to specify parts of your template to appear only under certain conditions.

Hasil Share ke Facebook

Kalo pernah buka HTML Template Blogger, mungkin pernah ngeliat yang kaya gini..
<b:if cond='data:blog.pageType == "index"'>
<title><data:blog.title/></title>
<b:else/>
<title><data:blog.pageName/> | <data:blog.title/></title>
</b:if>
Hasil dari tags diatas, pas kita ngunjungin Blog Home, yang kita liat di Title Bar cuman Nama Blog aja (data:blog.title), tapi pas kita buka Postingan atau Article yang kita liat di Title Bar Judul Article | Nama Blog (<data:blog.pageName/> | <data:blog.title/>)

Facebook Open Graph Meta Tags
<b:if cond='data:blog.pageType == "index"'>
<title><data:blog.title/></title>
<meta expr:content='data:blog.title' property='og:title'/>
<meta expr:content='data:blog.homepageUrl' property='og:url'/>
<b:else/>
<title><data:blog.pageName/> | <data:blog.title/></title>
<meta expr:content='data:blog.pageName + " | " + data:blog.title' property='og:title'/>
<meta expr:content='data:blog.url' property='og:url'/>
</b:if>

-------------------
Home Page Only
To display only on home page <b:if cond='data:blog.url == data:blog.homepageUrl'>
What is in here will be displayed only on home page
</b:if>
Archive Page Only
To display only on archive page <b:if cond='data:blog.pageType == "archive"'>
What is in here will be displayed only on archive page
</b:if>
Item/Post Page Only
To display only on item page <b:if cond='data:blog.pageType == "item"'>
What is in here will be displayed only on item page
</b:if>
Static Page Only
To display only on static pages <b:if cond='data:blog.pageType == "static_page"'>
What is in here will be displayed only on static page
</b:if>
Specific URL Only
To display only on specific URL <b:if cond='data:blog.url == "http://aing-creations.blogspot.com/"'>
What is in here will be displayed on above URL only
</b:if>
Certain Labels Only
To display only on certain labels only <b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name == "what the f"'>
What is in here will be displayed only on Posts which have label what the f
</b:if>
</b:loop>
You will need to be inside Blog Posts loop in order to use Certain Labels Only code

0 komentar:
Posting Komentar