Saturday, June 22, 2013

How to show blogger widget only in homepage


How to show blogger widget only in homepage


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>
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



capture

Click edit HTML

edit html

Click Proceed

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>


find

Replace with

change

<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>


Than save template .


No comments:

Post a Comment