Translate This Blog
Remember To Always Back Up Your Template Before Attempting Any Of The Tweaks On This Site

Choose Which Page To Show Gadgets

Normally by default your gadgets will show on every page in your blog. Now you can change that with a few Tweaks. This is a some what more advanced tweak then most. Other words make sure to back up your template before you try it.


Now it will help to find out which widget your trying to change.

  • To do this you will need to go to Design > Page Elements.
  • You need to give the gadget a unique name. For now lets just name it Tweak.
  • Now go to Edit HTML.
  • Expand widgets and search for (Ctrl+F) Tweak.
Now below I will go over what these gadgets may look like in your HTML.
  • Label Widgets:
<b:widget id='Label1' locked='false' title='Tweak' type='Label'>
  • HTML/javascript Widgets:
<b:widget id='HTML1' locked='false' title='Tweak' type='HTML'>
  • Link List Gadgets:
<b:widget id='LinkList2' locked='false' title='Tweak' type='LinkList'>
Now once you have found that you should see something like this just below it.

<b:includable id='main'>
Now depending where you want to show this gadget you will use one of these codes below. You will place these codes as shown in red.
  • Only On Homepage:
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
  • Only On Post Pages:
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
  • Specified Page:
<b:includable id='main'>
<b:if cond='data:blog.url == "Blog Post URL"'>
Now replace the Blue text in the code with the URL of the post you want it to display on. Now scroll down till you see the first b:includable tag You will need to place a closing b:if tag just above the b:includable tag
  • Example:
</b:if>
</b:includable>
Now your done provided you did it right when you save your template it wont give you any errors. You just need to go back and change the name of your gadget. Repeat this for as many gadgets you wish to apply this to.

10 comments:

Mandy Lum said...

This is by far the best information that I have found about how to choose which gadgets appear on what pages of your blog. Thanks for the help! The only problem I am having is getting the gadget border to not show up on every page. For example, my "quote of the day" gadget only appears on my home page, but the border appears on all of them. Any suggestions?

UseFullThings said...

I have done this with a bunch of widgets, and though it works it leaves a small rem anent of the gadget on the pages that it does not appear on. It is not too big an issue, I guess, just wondering what to do here in this case.
also, what do I do if I want to show a gadget on say, three different static pages. I don't seem able to do that.
Much appreciated.
thanks

AiresOFwar said...

You both might be better off using a slightly different tweak then this one.

Carradee said...

Sweet! It just worked fine for me on my novel I'm serializing! ^_^

Now, on to the next tweak I'm trying to figure out…

Carradee said...

P.S. Sorry, accidentally deleted the "Thank you" from that last comment when I deleted my ramble. Thanks for this input!

Ryan said...

This tweak is working great on my blog, however with internet explorer it seems like the widget is just hidden, not excluded. Any advice? I would like the whole widget to be replaced when going to an individual post.

Ryan said...

Solved my problem(close enough), with this post: http://www.tweakmyblogger.com/2010/07/hide-widgetsgadgets.html

Thanks!

Kate said...

Sorry to be dense but i'm trying to get rid of the border of the gadgets i've hidden on my home page just like some other people above.

I tried using the tweak suggested (/2010/07/hide_widgetsgadgets.html) instead of this one but it got really messed up.

Here is the dense part. Should i only be using one of the tweaks not both? I think that might be where i messed up. I tried this one and had the borders so I added the second set of code in...

Struggling here :-)

Thank you!!!!

AiresOFwar said...

Hey Kate, with Blogger it makes hiding the gadget without a trace a bit more difficult. In some cases it does not remove the gadget completely leaving borders or spacing in its place. You should only be using one of these codes but their is still a chance it will leave the bordering. If you can send me a email from the contact screen at the top of this site I will be more the happy to look into removing it. Make sure to contain your Blog URL, gadget ID, and what page you want to display it on.

dwijayasblog said...

Thanks,man.

Post a Comment

Please don't post hyperlinked text within the comment box! It will not be published and you will be marked as spam.

Web Design Blogs PageRank