Monday 2 July 2012

List Of Conditional Tags

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.

List of conditional tags :
Below is a list of conditional tags that target specific pages. I only list the opening tags here. Just make sure you include the closing </b:if> tag when applying a conditional in your template.

1.Index (list) pages 

Index pages include homepage, labels page and yearly archive page.
<b:if cond='data:blog.pageType == "index"'>
2.Post (item) pages 
<b:if cond='data:blog.pageType == "item"'>
3.Static pages 
<b:if cond='data:blog.pageType == "static_page"'>
4. Archive pages 
<b:if cond='data:blog.pageType == "archive"'>
5. Homepage 
<b:if cond='data:blog.url == data:blog.homepageUrl'>
6.Specific page/URL 
<b:if cond='data:blog.url == "PUT_URL_HERE"'>
7. Post and static pages
<b:if cond='data:blog.url == data:post.url'>
8. Label-search pages 
<b:if cond='data:blog.searchLabel'>
9. First post 

This is not a page, but a conditional for the first post. Used for targeting the first post on multi-post pages.
<b:if cond='data:post.isFirstPost'>
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.