It is very easy to show your selected widget only show in homepage and when you open any post then this widget will be hide. It is easily done by adding some code in widget code line.
- Go to Template >> Edit HTML and tick the "Expand Widget Templates" checkbox.
- Search widget id which one want to change .
- your widget code will look like this.
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'> <b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'/> </b:section>
Replace Code 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>
then save template.

That's it, you have successfully complete it.


No comments :
Post a Comment