-->

Widget Just Shown On Homepage

If yesterday I have discus how to make widget not shown on homepage, in this article i want to discus how to make widget just shown on homepage. so if your article is clicked by user, your widget not show on post page.
Ok let go..................................... step by step below



1. Widget Code Search

- Login into blogger
- Layout
- Edit HTML
- Check Expand Widget Templates

Suppose my recent post widget code is:
<b:widget id='HTML1' locked='false' title='' type='HTML'>
<b:includable id='main'>

<!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:includable>
</b:widget>

2. Add the code to be like this ...
<b:widget id='HTML1' locked='false' title='' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<!-- 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>
</b:widget>

Note that red is the enhancements ....
Good luck ...

Posting Komentar

Label

Subscribe Our Newsletter