So here i am sharing an amazing eye catchy related post widget. This new related posts widgets is stylish with lager thumbnails and a smooth hover effect to make it look cool. In addition to the fact that it displays the most accurate related articles in the list, this related posts widget is supported by all of the browsers.
Follow the below simple steps to implement this in your blog. The steps are simple and i believe you wont face any trouble adding the widget. However, if you face any difficulty in installing the widget in your blog don't hesitate to leave a comment.
Recommended Posts
• Multi Coloured Random Posts Widget
• Recent Posts Widget
• New Recent Comments Widget
Adding This Widget to your Blog
► Navigate to Blogger dashboard > templates and click on edit htmlnote: don’t forget to backup your template before editing
► Search for </head> and just above it paste the below code
<!--BLOGGSLAB.com Related Posts with thumbnails Scripts and Styles Start-->
<!-- remove --><b:if cond='data:blog.pageType == "item"'>
<style type='text/css'>
#related-posts h5{
font-size:22px;
text-transform: uppercase;
font-family: 'Trebuchet MS',arial,serif;
font-weight:bold;
text-shadow: 1px 1px 0 #F2F2F2, 1px 2px 0 #B1B1B2;
padding:10px 20px;
margin:0;
border-bottom:1px solid #cecece;
}
#related-posts {
float: left;
border: 1px solid #d2d2d2;
width: 100%;
}
#related-posts img {
width: 175px!important;
box-shadow: 0 0 5px #D56540;
}
#related-posts a {
width: 175px!important;
color:#476CBB;
}
#related-posts a:hover {
color: #000;
text-decoration: underline;
}
#related-posts img:hover {
opacity: 0.8;
}
</style>
<script type='text/javascript'>
var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEdiGE80B0eHv0jQIQtA5n8sRBnzEM4ZKTdQeNZ-_eVAjyvpmkjWP79Ph2KlpXH65LE9thXHvAbgYzONhL_yevvPkMo9ElcsQhqg6qvi1f3vP5PTNPbUh2j6CtuAl6KbJVRVbSA6Ldqn6W/s1600/no_image.jpg";
var maxresults=3;
var splittercolor="#DDDDDD";
var relatedpoststitle="Recommended For You::-";
</script>
<script src='https://googledrive.com/host/0B5td9UE6vZ75bnBMaGRXRHJaSlk' type='text/javascript'/>
<!-- remove --></b:if>
<!--BLOGGSLAB.com Related Posts with thumbnails Scripts and Styles End—>
► Now search for <data:post.body/> and just below it paste the below code.
EXTRA NOTE : Please note that there maybe multiple <data:post.body/> in your template. You have to try placing the below code on each one of them at a time. The code will work perfectly only if you place the below code after the correct <data:post.body/>
<!--Bloggsalb.com-Related Posts with Thumbnails Code Start-->
<b:if cond='data:blog.pageType == "item"'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != "true"'>
</b:if>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=related_results_labels_thumbs&max-results=3"' type='text/javascript'/></b:loop>
<script type='text/javascript'>
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs("<data:post.url/>");
</script>
</div><div style='clear:both'/>
</b:if>
<!-- Related Posts with Thumbnails Code End—>
► That’s it. Save changes made to your template.
Customizations
► change the number of related articles appearing by changing the value 3 in var maxresults=3;
Comments
Post a Comment