Target Your Widget or content any where with conditional tags andrey воскресенье, 26 мая 2013 г. No Comment

preview In this post I going to show you how add widget, buttons or anything else only on home page, post page, static page and only Selected post. you can do that with conditional tags. Conditional tags are Blogger template tags that allow you to specify parts of your template to appear only under certain conditions. The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches.
 

Conditional tags syntax

 

Update on 26-5-2013

The Syntax is Like This
 


Condition is entered as the value of the cond attribute. Each (opening) tag need to be closed with a closing tag.


 


Below is List of Conditional Tags



Just make sure you include the closing tag when applying a conditional in your template.


 


1. Index (list) pages

Index pages include homepage, labels page and yearly archive page.





2.  Home Page Only




3. Post (item) Page Only





4. First Post



This is not a page, but a conditional for the first post.





5. Static Page





6. Archive Pages





7. Specific Page/URL





8. Post and Static Page





9. Label-Search Pages





You can place these conditional tags any where in your template HTML Area. If you have any Trouble post your comments below I will try to make possible..thanks for reading our post.


How to apply Conditional Tags



To apply a conditional tag to a content, simply  put the content between the opening and the closing , like Below code.




Here is Your CONTENT


in the example above, the content or widget show only on post pages..  I am writing a few  more examples as soon as time Allow.

preview In this post I going to show you how add widget, buttons or anything else only on home page, post page, static page and only Selected post. you can do that with conditional tags. Conditional tags are Blogger template tags that allow you to specify parts of your template to appear only under certain conditions. The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches.
 

Conditional tags syntax

 

Update on 26-5-2013

The Syntax is Like This
 


Condition is entered as the value of the cond attribute. Each (opening) tag need to be closed with a closing tag.


 


Below is List of Conditional Tags



Just make sure you include the closing tag when applying a conditional in your template.


 


1. Index (list) pages

Index pages include homepage, labels page and yearly archive page.





2.  Home Page Only




3. Post (item) Page Only





4. First Post



This is not a page, but a conditional for the first post.





5. Static Page





6. Archive Pages





7. Specific Page/URL





8. Post and Static Page





9. Label-Search Pages





You can place these conditional tags any where in your template HTML Area. If you have any Trouble post your comments below I will try to make possible..thanks for reading our post.


How to apply Conditional Tags



To apply a conditional tag to a content, simply  put the content between the opening and the closing , like Below code.




Here is Your CONTENT


in the example above, the content or widget show only on post pages..  I am writing a few  more examples as soon as time Allow.

by Jillur Rahman

Jillur Rahman is a Web designers. He enjoys to make blogger templates. He always try to make modern and 3D looking Templates. You can by his templates from Themeforest.

Follow him @ Twitter | Facebook | Google Plus

No Comment