
Placing this related post widget on our blogger blog will also help our visitors navigating our site and it can encourage them to explore more posts. It is also a way of eliminating bounce rate of our site because the widget simply choosing articles that are in the same category or articles that related to the page. Sad to say, blogger blog does not have a default related post widget. However, we can make and put it manually by doing the simple steps below.
- Go to blogger dashboard
- Go to Template and click Edit HTML
- Now search the
</head>
tag (Press Ctrl+F on your keyboard and type </head> and hit enter to search) - Just before the
</head>
tag copy and paste the following codes provided below
<b:if cond='data:blog.pageType == "item"'><style type='text/css'>Customization: You may change the font size of an item on this related post widget by changing the value of 1.1em. I choose em as a unit of measurement for responsive design purpose.
.related-post-title{font-size:2.3em;margin: 5px 0px;}
#related-posts {margin: 0px 5px;}
#related-posts a {font-size: 1.1em;color:#970E0E;text-transform: capitalize;}
#related-posts a:hover {text-decoration: none;color: #555;}
#related-posts ul {list-style-type: none;padding: 0px;color: #000000;}
#related-posts li { padding: 0.7em 1.2em;border-bottom: 1px solid #E2E2E2;background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKoNeUEbUCMs_-P8u_-VYQth4jHRRvobWfPC6LzslV7b0Lo9UxyZXN3HNf_RsWKd_iQSsIJJjFn2hT02SE7pbBBWZ2da_g1v7cSBAz7pNXQyv-O6I0Ch7Z1DrnkRNIbod9uRIzXmg58ks/s1600/Arrow.png).2em 1em no-repeat;}
#related-posts li:hover {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKoNeUEbUCMs_-P8u_-VYQth4jHRRvobWfPC6LzslV7b0Lo9UxyZXN3HNf_RsWKd_iQSsIJJjFn2hT02SE7pbBBWZ2da_g1v7cSBAz7pNXQyv-O6I0Ch7Z1DrnkRNIbod9uRIzXmg58ks/s1600/Arrow.png).2em 1em no-repeat #E7F0FF;}
</style>
<script src='http://aireshalili.github.io/internetsmash/simple-related-post.js' type='text/javascript'/>
</b:if>
- Search
<div class='post-footer'>
code (Use again Ctrl+F. You may see this code twice, but you should stop on the second) - Just above this code, copy and paste the codes provided below
<!-- Ralated post Start --> <b:if cond='data:blog.pageType == "item"'> <div id='related-posts'><h4 class='related-post-title'>You may also like</h4><b:loop values='data:post.labels' var='label'> <b:if cond='data:label.isLast != "true"'> </b:if> <b:if cond='data:blog.pageType == "item"'> <script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=related_results_labels&max-results=5"' type='text/javascript'/></b:if></b:loop> <script type='text/javascript'> var maxresults=5; removeRelatedDuplicates(); printRelatedLabels("<data:post.url/>"); </script></div> </b:if> <!-- END Ralated -->Note: The default number of post shown on this widget is 5. You may change it by changing the 5 value from max-results=5.