TechNdo - Blogger tips, tricks, tutorials and widgets

Latest News

Wednesday 24 August 2016

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

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; + data:label.name + &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="http:www.thebloggerguide.com/simple-related-posts-widget-blogger/" 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.
  • Blogger Comments
  • Facebook Comments

0 blogger-facebook:

Post a Comment

Item Reviewed: Simple Related Posts Widget For Blogger Description: Rating: 5 Reviewed By: Ajay
Scroll to Top