Saturday , December 16 2017

Simple Related Posts Widget For Blogger

In the previous post, we have outlined that how to add related posts with thumbnail widget in blogger. This post very same to the last tutorial. Now we are going to add simple related posts widget in blogger. This is a great idea for those who want display more relevant post in the blog post footer without to effects the blog loading time. This widget will display only the post title in the post footer. This is also the best way for internal links building.
simple related posts widget for blogger

How to add simple related posts widget in blogger

  • Login into your blogger account
  • Go to Blogger Dashboard > Template
  • Backup your template – this important to backup your template because if you do any mistake then you can easily recover your template.
  • Click on, Edit HTML
  • Find </head> now click on “view code” and copy all coding from appearing pop-up window and paste just above </head> tag.
View Code

After the adding above coding then scroll down and search <data:post.body/> and paste the below code just above it.

<b:if cond='data:blog.pageType == &quot;item&quot;'><div id='related-posts'> <b:loop values='data:post.labels' var='label'> 
<b:if cond='data:label.isLast != &quot;true&quot;'> </b:if> 
<b:if cond='data:blog.pageType == &quot;item&quot;'> 
<script expr:src='&quot;/feeds/posts/default/-/&quot; + + &quot;?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=6&quot;' type='text/javascript'/></b:if></b:loop>
 <script type='text/javascript'> var maxresults=10; removeRelatedDuplicates(); printRelatedLabels(&quot;<data:post.url/>&quot;); </script>
<a style="font-size: 10px; color: #bcbcbc; float: right;" href="" rel="nofollow" >Get Related Post widget</a></div></b:if>

If you want to change the amount of links which are displayed in below post, then change the value of var maxresults=10 according to your need. Save the template and check the result.
Hopefully, it will be worked properly if you are facing any problem about simple related post widget for blogger then leave your comment.

Check Also

social media share button for blogger

Responsive Social Media Share Buttons for Blogger

Are you looking for social media share button for blogger? In this post, I want …

One comment

  1. The “view code” link is broken. Please fix. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *