How to Display Elements only on specific Pages in Blogger- Conditional tags1? - The WonderSpot - Know all in one spot
Breaking News:

How to Display Elements only on specific Pages in Blogger- Conditional tags1?

Display Elements only on specific Page in Blogger  - Conditional tags-1

Have you ever been confusing with like that codes in your Blogger template HTML?

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>

 Or looking for what are they……...?
 Let’s discuss….
Today we discuss about conditional tags.

How to Display Elements only on specific Pages in Blogger- Conditional tags1?

When you are studying your blog template specially, if you are using professional (third party) template have you ever think that how some certain elements or widgets appear only on certain types of pages?

Some certain widgets or elements of your template appear on the home page, but not on individual post pages also, sometimes side bars appear on homepage but not on individual post pages.
Also, If you are designing your Blogger template, you may prefer certain widgets or elements of your design to appear on certain types of pages or on the home page & not on individual post pages & you would prefer to display different buttons on different pages, or apply a metatag only to selected pages?

Then that article will help you.

I will explain how you can easily control page elements to display or not on certain types of pages in your Blogger blog.For do that we use Conditional tags to edit our blog template. Conditional tags are Blogger template tags that allow you to specify parts of your template to appear only under certain conditions. That provide us better control over our templates, allowing us to specify what part of our template appears only under certain conditions.
You may wish to hide a widget or element on one page and display it on the other, need to remove the sidebar on certain pages, or even display buttons on select pages. This is exactly where conditional tags come into play. There are a number of tags available for blogger which, if applied correctly, it will help you modify elements of your blog template.

But remember that Conditional tags work with all of the standard Blogger templates except Dynamic Views, which does not accept customization. Some third party templates may not accept conditional tags, but most do.

Before knowing about the Conditional tags. Let discuss about the different types of pages on blogger.

  1) home page     -   It’s your blogs home page.

  2) Archive Page -  Refers to archive pages. Pages that added by Archive widget that normally has “_archive.html”
 ending in  its URL belong to Archive page type  (to be displayed when readers view your archive pages)

  3) Item Page       -  Refers to Post Pages that created by clicking new post button (the individual post page)
  4) Index Page      -  Includes home page + label page + search results page. (pages readers see when they click the
 "Older  Posts" and "Newer Posts"  (links at the bottom of the page.)

  5) Static Page       - Blogger Pages that created by clicking new page button.
  6) Label Page       - Blogger label-based pages contain similar or related posted articles.

  7) Search Page    - Pages that provides a list of posts that matches the given query terms.

List of conditional tags

There are different conditions to check the page type. You can use these conditions for the selective display. The following are a select few conditional tags you'll require the most:

Home page:
<b:if cond='data:blog.url == data:blog.homepageUrl'>

First post:
<b:if cond='data:post.isFirstPost'>

Archive Pages:
<b:if cond='data:blog.pageType == "archive"'>

Specific page/URL:
<b:if cond='data:blog.url == "ENTER_URL_HERE"'>

Item page(post):
<b:if cond='data:blog.pageType == "item"'>

Static pages:
<b:if cond='data:blog.pageType == "static_page"'>

Index pages (includes homepage, label pages, search result pages and archive pages):
<b:if cond='data:blog.pageType == "index"'>

Archive pages:
<b:if cond='data:blog.pageType == "archive"'>

Posts and static pages:
<b:if cond='data:blog.url == data:post.url'>

Label-search pages:
<b:if cond='data:blog.searchLabel'>

404 Error Page:
<b:if cond='data:blog.pageType == "ERROR_PAGE"'>

Mobile Pages:
<b:if cond='data:blog.pageType == "data:blog.isMobile"'>

Particular url only:
<b:if cond='data:blog.canonicalUrl == &quot; PUT_URL_HERE&quot;'>

Ok. Now i think you have a better idea about conditional tags.
To know how to use conditional tags in your blogger blog please visit below link.

How to Use conditional tags?.......>>>

How to hide side bar in post page?....>>>

For more reading THEWONDERSPOT

How to make your blog SEO friendly?.........................>>>

All in one SEO pack for Blogger blog...........................>>>

Thank you for reading - How to Display Elements only on specific Pages in Blogger- Conditional tags1?
Good Luck.

Don’t forgot to Subscribe us to get latest news letters and give your feedback in below comment section ;-) ;-)

Post a Comment