Thursday, April 21, 2011

How to Show Widget Only in Post

Previously, I've posted about How To Show Widget Only In Next Page (Not in "Home"). But in this trick, you will learn How to Show Widget Only in Post. It's mean, you can add some widgets around blog post, but this widget can't see in home page. For example, you can see my "Alexa Review Widget" (I hope you write a review for this blog... ^_^), this widget can't be seen by us on homepage, but if you clicked one of the post, you can see the widget. What's the advantages? The advantages is so blog homepage isn't too heavy. Because homepage plays an important role, if a visitor feel this blog is too heavy, maybe he will not return again. Shortly, if you want to try How to Show Widget Only in Post, just follow the steps below. (We will use "Alexa Review Widget" as an example")

1. Log in to your blogger account
2. Go to Design --> Edit HTML
3. Check in the "Expand Widget Templates" box
4. Add Alexa Review Code under <data:post.body/> (If you're using read more, there are two   <data:post.body/>, choose the second)
5. But, before you click SAVE TEMPLATE, you have to add some code, so the alexa code will be like this
<!-- remove --><b:if cond='data:blog.pageType == &quot;item&quot;'>
<a href='http://www.alexa.com/siteinfo/http://full-tricks.blogspot.com/?p=rwidget#reviews'><img alt='Review http://full-tricks.blogspot.com/ on alexa.com' src='http://www.alexa.com/images/widgets/red/dark/v2-234x60.png'/></a>
<!-- remove --></b:if>
=> The red code are the special code
6. And now you can click SAVE TEMPLATE

No comments:

Post a Comment