Ads 468x60px

freak2code is the blog about latest geek news,software reviews ,trends in technology and more informative stuff......

Friday, 24 August 2012

How to show blogger widget only in homepage


How to show blogger widget only in homepage



I have received many comment ask about how to show my popular post only in home page. actually this trick is very easy many blogger already made tutorial about this. You can search from google. The method is usng if conditional from blogger.
if you want show all section you don’t have to ‘Expand Widget Template’
find this
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'/>
</b:section>
Change to this
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'/>
</b:section>
</b:if>

Demo
From demo click any posts and you can’t see Popular post widget anymore
Now I’ll show this tricks by using New Blogger Dashboard
Click Template from Dropdown of your Blog
Click edit HTML
Click Proceed
Search :
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'/>
</b:section>
Replace with
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'/>
</b:section>
</b:if>

0 comments:

Post a Comment

Recent Posts