Skip to main content

How to make a gadget appear only in Home page or the page you wish?

  1. Sign in to blogger.
  2. First Backup your blogger template.
  3. Go to Layout. 
  4. Add a HTML/Java Script gadget that you want to make appear only in homepage of your blog and title it as homeonly(for qucik reference)
  5. Go to Dashboard > Template > Edit HTML.
  6. Press Ctrl + F and find homeonly. You will see a code as follows.
    <b:section class='main' id='main' preferred='no'>
    <b:widget id='HTML1' locked='false' title='homeonly' type='HTML'>
    <b:includable id='main'>
    <!-- only display title if it's non-empty -->
    <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
    </b:if>
    <div class='widget-content'>
    <data:content/>
    </div>
  7. Replace the code highlighted in yellow above, with the following codes respectively.
    1. <b:if cond='data:blog.pageTitle == data:blog.title'><data:title/></b:if> 
    2. <b:if cond='data:blog.pageTitle == data:blog.title'><data:content/></b:if>
  8. Now the code in Step 5 will look as below.
    <b:section class='main' id='main' preferred='no'>
    <b:widget id='HTML1' locked='false' title='homeonly' type='HTML'>
    <b:includable id='main'>
    <!-- only display title if it's non-empty -->
    <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><b:if cond='data:blog.pageTitle == data:blog.title'><data:title/></b:if></h2>
    </b:if>
    <div class='widget-content'>
    <b:if cond='data:blog.pageTitle == data:blog.title'><data:content/></b:if>
    </div>
  9. Save Template. You got it!
Update
  1. If you want to make a gadget appear in a page you wish, for example, To make a gadget appear only in the page of this post, modify the above condition as below,
    <b:if cond='data:blog.pageTitle == "How to blog?: How to make a gadget appear only in Home page or the page you wish?"'>
  2. You can see such a widget in the page of this article itself.
  3. Any widget can be made with the following condition! 
Update 2

Read: Gadget in mobile home page alone 
See related posts:

Comments

  1. This is very attention-grabbing, You’re an excessively professional blogger. I have joined your feed and look forward to in the hunt for extra of your excellent post. Additionally, I have shared your web site in my social networks

    ReplyDelete
  2. This is very attention-grabbing, You’re an excessively professional blogger. I have joined your feed and look forward to in the hunt for extra of your excellent post. Additionally, I have shared your web site in my social networks

    ReplyDelete
  3. I'd like to remove my Blog Achive and put it on another Page. Is there a way to do this?

    ReplyDelete
    Replies
    1. Yeah! You have a way! Using the update of this article. Start discussion in ask questions page so that it will be helpful for us to help you even more clearly.

      Delete
  4. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
    html5 music player

    ReplyDelete
    Replies
    1. Thanks! but, Be careful that, you don't post spam links further.

      Delete

Post a comment

Feeds for you

How to secure your Google account and Blogger blog?

As a part of contributions to NCSAM, I am writing this article down on what all should we be aware of with respect to Google's security aspect and how to make sure your blog stays yours forever.
What is NCSAM? It's National Cyber Security Awareness Month which is observed during the month of October every year in America.

However, we all know cyber security is a world topic and is not limited to just the USA. So let me give some tips with respect to keeping the Google account safe and Blogger blogs safe from hackers.

As I secure my account, I hope you people catch up too.

In this blog post, I am going to tell about the following,
Securing your Google account.Securing your Blogger blog. Securing your Google account Since Blogger is also part of your Google account, let's first see what all we need to do to keep our Google account safe. Don't share your password to anyone.Keep changing your password every 60 - 90 days.Make sure your password is strong enough. Have at leas…

Blogger HTTPS for custom domain and Cloudflare

In BHF, there was a recent issue related to cloudflare where the browser screams the site is a phishing site. So I thought of writing up how does a service like cloudflare affect your blogger blog.

What is Cloudflare?

Well we have that written all over Wikipedia. Let's go on with why Blogger users look for Cloudflare.
Anciently Blogger users used cloudflare for one simple reason. HTTPS for custom domains.

So what happens when you introduce cloudflare into your domain?
DNS Redirect.
Your custom domain will be configured with the proxy info provided by cloudflare and when the request is hit, DNS redirect happens.
DNS redirect is bad for the site's health. A number of reasons, but the most important is that some browsers, when it detects a DNS redirection, it thinks that it is a phishing site.

What is a DNS redirect?

I am trying to explain this in easy terms. I'll try not to be too technical. When a custom domain URL is hit, usually the domain requests go to Name servers from w…

Blogger in Draft says "Try the new Blogger!"

It's been long time that I wrote something here. Interestingly there seems to be a new update in Blogger in Draft (https://draft.blogger.com).