How to display linkwithin related posts only in post pages

Linkwithin is a popular plugin which is used to display related posts with thumbnail in both Wordpress and Blogger or its fast and easy installable. But what is the main biggest problem in blogger? When user install this widget, its display related posts (Home page and post pages) so that some users like or don’t like to display related posts both (Home and post pages). So that the solution of this problem is

Display related posts only in post pages blogger










Steps to Display Related Posts only in post pages


Step: 1  Go To blogger > Template

Step: 2  Backup your template

Step: 3  Click Edit HTML > "expand widget templates"

Step: 4  Now Search (CTRL+F) Linkwithhin widget in your template. Find any of line below Code

Example find this line ( <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'> )
or
( </b:includable> )

Tip: If below showing code not found in your blogger template you must need to install link-within widget first.

<b:widget id='HTML1' locked='false' title='Recent Posts' 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>

Step: 5  When you find above code in your template You add two pieces of code to make display related posts only post pages


<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<!-- 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:if>
</b:includable>

Step: 5  Copy the RED code and paste in place for your gadget

Step: 6  Now Save your template and see the Result.


Drop Your Comments And Questions Below.

See also:

comments powered by Disqus