If you use blogger and care about your website's SEO, if you want your site to appear on Google search then you need to make use of conditional tags to make your pages responsive and load fast. Here are important tags you would need to achieve that aim and make your site search friendly.
Useful Blogger Conditional Tags
1. Tag to Show Widget or Script Only on Homepage
2. Tag to Show Widget Or Script Only On a Particular Page
3. Tag to Show Widget or Script Only on Post and Pages
4. Tag to Show Widget or Script Only on Archive Pages
5. Tag to Show Widget or Script Only on Label Pages
6. Tag to Show Widget or Script Only on Post and Static Pages
7. Tag to Show Widget or Script Only on Static Pages
8. To Show Collectively on Pages e.g homepage, archive, label, static pages
Guide To Use Blogger Conditional Tags
Below is an example of a script, your conditional tag should be pasted on the highlighted portion of text "Your condition here"
Useful Blogger Conditional Tags
1. Tag to Show Widget or Script Only on Homepage
<b:if cond=’data:blog.url == data:blog.homepageUrl’> Your Section or Widget portion here</b:if>This is used to hide any anything from other pages and make it appear on the homepage, you can use this to hide your sidebar, header, footer etc and allow it to display only on the homepage.
2. Tag to Show Widget Or Script Only On a Particular Page
<b:if cond=’data:blog.url == “URL of the page“‘> Your Section or Widget portion here</b:if>This allows you show anything only the page you feel it's required and useful, edit and paste the URL of the page you want the script to show as highlighted and save.
3. Tag to Show Widget or Script Only on Post and Pages
<b:if cond=’data:blog.pageType == “item”‘> Your Section or Widget portion here</b:if>Use this tag to hide anything from homepage, archive and search pages and have it appear on the post and static pages only.
4. Tag to Show Widget or Script Only on Archive Pages
<b:if cond=’data:blog.pageType == “archive”‘>If you want a widget to appear only on archive pages and hide it from other pages then make use of the conditional tag above.
Your Section or Widget portion here
</b:if>
5. Tag to Show Widget or Script Only on Label Pages
<b:if cond=’data:blog.searchLabel’> Your Section or Widget portion here</b:if>If you want a widget to appear only on label pages and hide it from other pages then make use of the conditional tag above.
6. Tag to Show Widget or Script Only on Post and Static Pages
<b:if cond=’data:blog.url == data:post.url’> Your Section or Widget portion here</b:if>Use this to make any widget or script visible on the post and static pages while invisible on every other page.
7. Tag to Show Widget or Script Only on Static Pages
<b:if cond=’data:blog.pageType != “static_page”‘> Your Section or Widget portion here</b:if>This tag is used to show any portion or widget on static pages only, the widget won't be displayed on a nonstatic page.
8. To Show Collectively on Pages e.g homepage, archive, label, static pages
data:blog.pageType == “index”9. To Show Only on Search Results Pages
data:blog.searchQuery10. To Show Only on First Post
data:post.isFirstPost11. To Show Only on 404 Pages
data:blog.pageType == “error_page”12. To Show On Multilevel Pages
<b:else />13. To Reverse Blogger Tag
<b:if cond=’data:blog.url == data:post.url’>
</b:if>To reverse this condition replace == with !=
Guide To Use Blogger Conditional Tags
Below is an example of a script, your conditional tag should be pasted on the highlighted portion of text "Your condition here"
<b:if cond = ‘Your Condition here‘>Your Section or Widget portion here</b:if>The HTML code should look like the script below if you added the show only on homepage tag correctly.
<b:if cond = ‘data:blog.url == data:blog.homepageUrl‘><div class=”name”></div>ORFree free to ask any question and get replied as soon as possible, you may also want to check out this tutorial by a friend on how to redirect your non-www URL to www, am very sure it would boost your SEO performance.
<b:widget id=”name” locked=”false” title=”name” type=”HTML”></b:widget></b:if>
This will be the perfect blog for anyone who desires to discover about this topic and I feel pleasure to view your website. Thanks for sharing such an informative information in a gentle manner! Keep it up and all the best. regardsFILMYWAP
ReplyDeleteWow am flattered! Thanks for the compliment Soniya.
DeleteThis is just the right post i've been looking for... thankfully i happen to stumble upon this very informative post...
ReplyDeletethanks for taking out time to blog on these "conditional tags".. i am most grateful ..and will surely recommend your blog
Wow! Am happy to hear that, thank you pal.
Delete