You may want some of the widgets displayed only on your home page or on specific page. This can be made possible by going through these simple steps.
- Login to blogger and select Template tab.
- Click 'Edit HTML' button to open up a window.
- Click 'Proceed' and you reach a page showing the source code of your blog.
- Do not 'Expand Widget Templates'. Now search for the below code. [The code will have slight difference from the below code according to the type of gadget you have, its title and its type]
- This can be searched by using 'Find' tool in your browser. 'Edit-Find' or 'ctrl-f'' and search for a unique keyword like '<b:includable id='main'>'.
- You may get more than one search result. Find out the gadget's code that you need to show in the home page by checking title.
<b:widget id='HTML1' locked='false' title='TITLE' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
- Replace the above code with the one given below.
<b:widget id='HTML1' locked='false' title='TITLE' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
- Replace the 'if' condition code '<b:if cond='data:blog.url == data:blog.homepageUrl'>' shown above with the following code.
<b:if cond='data:blog.pageType == "item"'>
Show on a Specific Post only:- Replace the 'if' condition code '<b:if cond='data:blog.url == data:blog.homepageUrl'>' shown above with the following code.
<b:if cond='data:blog.url == "POST-URL"'>
- Replace the 'POST-URL' with the url of the post where you want to show the gadget.
Still any doubts? Comment here. Its my pleasure to help you!!!


No comments:
Post a Comment