Skip to main content

Add Related Posts Widget To Blogger

Related posts for blogger

Having a related posts widget displayed in your blog's post page below every article is highly recommended. The related post widget is a must have for every blogger hoping to grow bigger with blogger. 

You probably drive traffic from search engines, social media and other sites, once your visitors find what they are looking  for, they may leave your blog without visiting another page. This results to inevitable bounce rate on your Google Analytics. 
above all, installing related posts widget will surely reduce your bounce rate and increase your page views.

 This article will guide you on how to add related posts widget with thumbnails just below your blog post body, so that when your readers finish reading an article they are interested in, they may sight other articles that are related to their interest, 

Pros of Related post Widget
• It will increase page views.
• It reduces bounce rate.
• It will improve internal linking.
• It will improve user interaction

How to Add Related Posts Widget in Blogger
° Change the default Site Feed setting; Go to Settings >> Other, then set 'Allow Blog Feed to Full'.

1. In your Blogger Dashboard click on Template and backup your template. Once done, click on Edit HTML and find this code 

</body> 


<!-- BEGIN CODE IT PRETTY RELATED POSTS GALLERY CODE -->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
    
<style>
.related-posts {
  width: 100%;
  margin: 2em 0;
  float: left;
}
 
.related-posts ul li {
  list-style: none;
  margin: 0 5px;
  float: left;
  text-align: center;
}
</style>
    
    
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'/>
<script>
 
//<![CDATA[
$undefineddocument).readyundefinedfunctionundefined) {
    
    
    
    //CODE OPTIONS
    
    
    var maxSearched = 500; 
    var minimum = 3; 
    var maximum = 4; 
    var imageSize = 100; 
    var roundImages = true; 
    var relatedTitle = true; 
    var labelInTitle = false;
    var relatedTitleText = "RELATED POSTS"; 
    var defaultImage = ""; 
    var campaignTracking = false; 
    var campaignSource = ""; 
    var campaignMedium = ""; 
    var campaignName = "";
    var postLabels = $('.post-labels a');
    var insertBefore = $('.post-footer'); 
    
    
    //END CODE OPTIONS - DO NOT EDIT BELOW THIS LINE
 
var labels=[];var label;var alternateLabel;var minposts=minimum-1;var postlabels=$undefined".post-labels a");ifundefinedpostlabels.length===1){label=postlabels.textundefined).trimundefined)}else ifundefinedpostlabels.length>1){$undefinedpostlabels).eachundefinedfunctionundefined){labels.pushundefined$undefinedthis).textundefined).trimundefined))});label=labels[Math.floorundefinedlabels.length*Math.randomundefined))];var labelLocation=labels.indexOfundefinedlabel);ifundefinedlabelLocation===labels.length-1){alternateLabel=labels[labelLocation-1]}else{alternateLabel=labels[labelLocation 1]}}ifundefinedlabel!==undefined){var title=$undefined".entry-title").textundefined).trimundefined);var labelCount=0;var alternateLabelCount=0;var matches=[];var url=$undefined'link[rel="alternate"][title*="Atom"]').equndefined0).attrundefined"href");$.ajaxundefined{url:url,data:{"max-results":maxSearched,alt:"json-in-script"},dataType:"jsonp",success:functionundefinede){$.eachundefinede.feed.entry,functionundefinedt,n){ifundefinede.feed.entry[t].category!==undefined){var r=[];forundefinedvar i=0;i<e.feed.entry[t].category.length;i  ){r.pushundefinede.feed.entry[t].category[i].term)}ifundefined$.inArrayundefinedlabel,r)!==-1){labelCount  }ifundefined$.inArrayundefinedalternateLabel,r)!==-1){alternateLabelCount  }}});ifundefinedlabelCount<=minposts&&alternateLabelCount>=minposts){label=alternateLabel}$.eachundefinede.feed.entry,functionundefinedt,n){ifundefinede.feed.entry[t].category!==undefined){var r=[];forundefinedvar i=0;i<e.feed.entry[t].category.length;i  ){r.pushundefinede.feed.entry[t].category[i].term)}ifundefined$.inArrayundefinedlabel,r)!==-1){var s=e.feed.entry[t].title.$t.trimundefined);ifundefineds!==title){var o;forundefinedvar u=0;u<e.feed.entry[t].link.length;u  ){ifundefinede.feed.entry[t].link[u].rel==="alternate"){o=e.feed.entry[t].link[u].href}}var a;ifundefinede.feed.entry[t].media$thumbnail!==undefined){a=e.feed.entry[t].media$thumbnail.url.splitundefined/s72-c/).joinundefined"s" imageSize "-c")}else{a=defaultImage}ifundefinedmatches.length<maxSearched&&campaignTracking===false){matches.pushundefined'<li><a href="' o '"><img src="' a '" alt="' s '" nopin="nopin">' s "</a></li>")}else ifundefinedmatches.length<maxSearched&&campaignTracking===true){matches.pushundefined'<li><a href="' o "?utm_source=" campaignSource "&utm_medium=" campaignMedium "&utm_campaign=" campaignName '"><img src="' a '" alt="' s '" nopin="nopin">' s "</a></li>")}}}}});ifundefinedmatches.length>=minimum){ifundefinedrelatedTitle===true&&labelInTitle===true){insertBefore.beforeundefined'<div class="related-posts"><h5>' relatedTitleText ' <span class="related-term">' label "</span></h5><ul></ul></div>")}else ifundefinedrelatedTitle===true&&labelInTitle===false){insertBefore.beforeundefined'<div class="related-posts"><h5>' relatedTitleText "</h5><ul></ul></div>")}else{insertBefore.beforeundefined'<div class="related-posts"><ul></ul></div>')}matches.sortundefinedfunctionundefined){return.5-Math.randomundefined)});forundefinedvar t=0;t<maximum;t  ){$undefined".related-posts ul").appendundefinedmatches[t])}}insertBefore.cssundefined"clear","both");$undefined".related-posts ul li").cssundefined"max-width",imageSize);$undefined".related-posts ul li img").cssundefined{"max-width":imageSize,height:imageSize});ifundefinedroundImages===true){$undefined".related-posts ul li img").cssundefined"border-radius","50%")}}})}
});
//]]>
</script>
    
</b:if>
<!-- END CODE IT PRETTY RELATED POSTS GALLERY CODE --> 


Editingthe gallery options in the "Code Options" section of the code.

The code options section is between "//CODE OPTIONS and "//END CODE OPTIONS"

Guide to editing Code below:

 //CODE OPTIONS
    
    
    var maxSearched = 500; 
    var minimum = <minimum posts>; 
    var maximum = <maximum posts; 
    var imageSize = <image size>; 
    var roundImages = <rounded image 'true or false'>; 
    var relatedTitle = <Widget title 'true or false'>; 
var labelInTitle = <Add label to widget title 'true or false'>;
var relatedTitleText = "<Text to display as Title>";
var defaultImage = <"add default image here for posts without image">; var campaignTracking = false; var campaignSource = ""; var campaignMedium = ""; var campaignName = ""; var postLabels = $('.post-labels a'); var insertBefore = $('.post-footer'); //END CODE OPTIONS

 Edit the above carefully so you don't delete the semicolon if you update an option. After you update an option, press the "preview template" button to check for errors before saving.

Comments

Popular posts from this blog

Earn While you Save With Alat.ng

If you've always wanted to save up for the future, but didn't take actions for reasons best known to you, now is the time to reconsider your thoughts and take actions, because there is a digital bank known as ALAT waiting to be utilized. What Is A Digital Bank? According to Avoka.com; "Digital banking is the digitization (or moving online) of all the traditional banking activities and programs that historically were only available to customers when physically inside of a bank branch." What is ALAT? ALAT is a digital bank, the first if its kind in Nigeria! It is an innovation of Wema Bank Nigeria, developed to give you easy access to saving your funds and doing other bank transactions without being physically present at the bank.  With Alat digital bank, you can open a savings account using your phone number and Bank Verification Number (BVN) as well as other documents that you will be prompted to upload during the registration process. It’s simple, convenient, reliabl...

How To Add Instagram Feed To Your Blog

You probably have an Instagram account and would want to showcase your pictures in your blog. Adding an Instagram widget to your blog goes beyond just showcasing your account to gaining followers, who wouldn't want more followers? This post will be your guide in embedding an Instagram feed into your blog. For people do not use or have an idea of Instagram, to let you know about the beautiful platform, I will run through it briefly.  Instagram is an online photo and video sharing network which let you share photos and videos straight from your mobile device to your account for your followers viewing pleasure. With Instagram, you can automatically share your photos and videos on social media networks such as Facebook, Twitter, Tumblr, and Flickr. I will be sharing a couple of tutorials with you today that not require a plugin, and can be used on either WordPress or Blogger platform, although I will center more on blogger users. There are many websites that could work ...

An Unbiased Infolinks Review

Today, I will be going over the adnetwork, infolinks.com in my own way. let's find out if it is a good adsense alternative or one that can be used with adsense. Discovering Infolinks I found out about infolinks while searching for AdSense alternatives when I was unable to get AdSense approved for my account, Then I applied with my previous blog but darn, the blog probably did not meet their demands and I was never approved. Few months laters I got AdSense approved for my blog but that didn't live long enough, to my detriment and after been blown off by the infamous Adsense Disablement ish (made me ditch my previous blog)... Months after setting up my new blog, I had to look for an AdSense alternative, and every research I made, didn't exclude Infolinks, and this made me think highly of them and so I had to give an application another shot, this time within a day, I got approved to display ads on my blog... Bam! Such a nice achievement... Getting To Understa...