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 

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

Popular posts from this blog

How to connect any other profile in "About me" widget?

In this article I am going to tell "How to connect any other profile in "About me" widget along with blogger or Google+?"